components/Progress
import { … } from 'zidane-ui'ui/src/components/Progress.tsx
Components#
ProgressComponent#
Renders the count, its line and the bar.
function Progress(props: ProgressProps): ElementParameters
| Name | Type | Description |
|---|---|---|
| props | ProgressProps |
Returns
ElementProps
| Name | Type | Default | Description |
|---|---|---|---|
| className? | string | Extra classes on the root element. | |
| format? | (value: number) => string | Formats a value. Default: the number in full, up to two decimals. | |
| label? | ReactNode | What is measured, before the numbers. Also the bar's accessible name. | |
| max? | number | 100 | The goal. |
| size? | 'stat' | 'headline' | 'stat' |
|
| style? | CSSProperties | Inline styles on the root element. | |
| threshold? | number | The level the value should reach. Under it, the bar takes | |
| tone? | ProgressTone | 'neutral' | The bar's color under |
| unit? | string | The values' unit (see | |
| value | number | How far, from 0. |
Functions#
progressShareFunction#
The share of max that value is, from 0 to 1.
function progressShare(value: number, max: number): numberParameters
| Name | Type | Description |
|---|---|---|
| value | number | How far. |
| max | number | The goal. |
Returns
numberInterfaces#
ProgressPropsInterface#
Props for Progress.
interface ProgressPropsProperties
| Name | Type | Default | Description |
|---|---|---|---|
| className? | string | Extra classes on the root element. | |
| format? | (value: number) => string | Formats a value. Default: the number in full, up to two decimals. | |
| label? | ReactNode | What is measured, before the numbers. Also the bar's accessible name. | |
| max? | number | 100 | The goal. |
| size? | 'stat' | 'headline' | 'stat' |
|
| style? | CSSProperties | Inline styles on the root element. | |
| threshold? | number | The level the value should reach. Under it, the bar takes | |
| tone? | ProgressTone | 'neutral' | The bar's color under |
| unit? | string | The values' unit (see | |
| value | number | How far, from 0. |
Types#
ProgressToneType#
The color of a Progress bar.
type ProgressTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger'