Components
Tally
A few numbers side by side, for comparison. Each sits on a rule with its label beneath; at most one carries light, and that one is ours.
Overview
- 21Booking.com
- 16Airbnb
- 15Zomato
- 1Aurora
Anatomy
- 21Booking.com
- 1Aurora
- 1RuleA strong hairline over each figure, at least 74px wide.
--au-border-strong - 2FigureSerif, 27px, lining and tabular so numbers compare cleanly.
--au-font-serif - 3LabelWhat the number counts.
.au-type-label - 4HighlightThe one figure that is ours: its rule becomes light and its number bone.
--au-light
Usage
- 21Booking.com
- 16Airbnb
- 1Aurora
Compare two to five figures of the same kind, and highlight the one the argument is about.
- 21Booking.com
- 16Airbnb
- 1Aurora
Don’t highlight more than one. Two lit figures cancel each other out.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| items* | { value: string | number; label: string; highlight?: boolean }[] | — | Two to five figures. |
Tokens
| Token | Value | Used for |
|---|---|---|
| --au-border-strong | → night.700 · #2A2D33 | Hover, and controls that need a visible edge. |
| --au-text-tertiary | → stone.400 · #8B8981 | Details and metadata. 5.7:1. |
| --au-text-primary | → stone.50 · #EDEBE5 | What Aurora says. 16.7:1 on ground. |
| --au-light-lo | → aurora.mint · #7FD9C0 | Start of the aurora. |
| --au-light-hi | → aurora.violet · #A78BE0 | End of the aurora. |
Code
<Tally items={[
{ value: 21, label: 'Booking.com' },
{ value: 16, label: 'Airbnb' },
{ value: 1, label: 'Aurora', highlight: true },
]} />