Components
BaseTrendChip
A small chip with the change of a figure, coloured by whether going up is good or bad.
components/ui/BaseTrendChip.vue
View in the demo
Example
Up+8.1%
Down-2.3%
Down-0.6 pp
Up+1.2%
Up+3.4%
No change0.0%
Up+120
API
Props
Name | Type | Default | Description |
|---|---|---|---|
valuerequired | number | — | The change. Positive values show an up arrow. |
unit | ChangeUnit | "%" | %, pp (percentage points) or abs (absolute). |
intent | ChangeIntent | "up-is-good" | up-is-good, down-is-good (churn, costs) or neutral. |
Accessibility
The chip includes a hidden “increased” or “decreased” text so the direction is not conveyed by colour alone.