CountdownTile
import { CountdownTile } from "@study/ui"
Result
Loading...
Live Editor
<List variant="raised" style={{ maxWidth: 440 }}> <ListRow leading={<CountdownTile value={2} unit="days" tone="orange" />} title="Submit exercise sheet 4" meta="Engineering Mechanics · Thu, 5 Nov" /> <ListRow leading={<CountdownTile value="Today" unit="23:59" tone="rot" />} title="Exam registration" meta="Examination office" /> </List>
Variants and states
Light
1day9days106days3weeksDark
1day9days106days3weeksWhen to use
- In front of deadlines in lists. The colour is the course's – not "red because soon".
- Mind the singular: "1 day", "2 days". Today:
value="Today"and the time asunit.
Props
| Prop | Type | Default | Meaning |
|---|---|---|---|
unit * | string | – | What it counts, e.g. "days"; "day" for one. |
value * | string | number | – | The number, e.g. 2. |
className | string | – | |
size | "sm" | "md" | md | |
tone | "blau" | "petrol" | "gruen" | "gelb" | "orange" | "rot" | "violett" | "grau" | grau |
Accessibility
- Number and unit are text and are read together ("2 days").