Timestamp
@astryxdesign/core v0.7.1 · Timestamp
Props
| Name | Type | Default | Description |
|---|---|---|---|
value | string | number | - | An ISO instant, or unix seconds. Written to the datetime attribute. |
format | TimestampFormat | 'auto' | relative, relative_short, auto, date, date_long, date_weekday, date_time, time, system_date, system_date_time, system_time, or unix_seconds. |
autoThreshold | number | 604800 | Seconds before auto switches from a relative phrase to date_time. |
hasTooltip | boolean | true | Shows a hover card with a copyable absolute time. tooltipEntries replaces the default lines. |
tooltipEntries | TimestampTooltipEntry[] | - | Each entry picks a format, an optional timezoneID, and an optional label. |
isTimezoneShown | boolean | false | Appends a short zone name to date_time and time. |
isLive | boolean | false | Refreshes a relative reading. The interval lengthens as the instant gets older. |
type | TextType | 'supporting' | Typography role passed to Text. |
size | TextSize | - | Optional size override. |
color | TextColor | 'disabled' | 'secondary' | disabled is painted by this component. The other names are text colors. |
weight | TextWeight | - | Optional weight override. |
An unknown timezoneID warns in the console and falls back to the local zone.
Theming
The visible text uses the text tokens for the chosen color. disabled uses --astryx-color-text-disabled. The hover card is the shared HoverCard.