Data well
Data well is for displaying a large numeric value with supporting labels.
- Install
npm install @pluralsight/ps-design-system-datawell
- Import
import DataWell from '@pluralsight/ps-design-system-datawell'
Examples
Labels
Often Data Wells are shown in a row. Data Well is designed to fit inside this experience. Simply wrap them in a flex container. Labels should provide context into the main meaning of the data shown.
label
is always required. subLabel
is optional.
import DataWell from '@pluralsight/ps-design-system-datawell'import React from 'react'function Example() {return (<div style={{ display: 'flex' }}><DataWell label="Active learners">7.2 Billion</DataWell><DataWell label="Pluralsight ROI">Vast</DataWell><DataWell label="Lives changed" subLabel="Up to 11">11/10</DataWell></div>)}export default Example
Guidelines
Keep labels, sublabels, and values short as possible.
Royalty Payments
$123M
Last 30 days
Do
Royalties Paid to Authors
$123,456,789.03
For the period of the last thirty days
Don't
Accessibility
WCAG 2.1 AA Compliance
100% axe-core testsManual audit
Props
Name | Type | Description | Default |
---|---|---|---|
children Required | React.ReactNode | main data to display |
|
label Required | string | primary explanatory label |
|
subLabel | string | secondary contextual label |
|