API and Development
Time renders a native <time> element, pairing a machine-readable dateTime with a human-readable children label. It carries no typography or visual styling - compose Text around Time when the label needs styling, since Text has no as/asChild prop and cannot render <time> itself.
| Name | Type | Default | Description |
|---|---|---|---|
dateTime | string | — | Machine-readable instant for the dateTime attribute (for example ISO 8601). |
aria-description | LocalizedMessage | — | Extended description for assistive tech. |
aria-label | LocalizedMessage | — | Accessible name when the visible label is insufficient. |
aria-placeholder | LocalizedMessage | — | Hint for an empty control. |
children | ReactNode | — | Human-readable label; compose {@link Text} around Time when typography is required. Replaces format. |
className | string | — | Classes appended to the host. |
data-align | undefined | — | — |
data-checked | undefined | — | — |
data-copy-status | undefined | — | — |
data-dirty | undefined | — | — |
data-disabled | undefined | — | — |
data-dragging | undefined | — | — |
data-ending-style | undefined | — | — |
data-expanded | undefined | — | — |
data-filled | undefined | — | — |
data-focus-visible | undefined | — | — |
data-focused | undefined | — | — |
data-highlighted | undefined | — | — |
data-hovered | undefined | — | — |
data-indeterminate | undefined | — | — |
data-instant | undefined | — | — |
data-invalid | undefined | — | — |
data-is-new | undefined | — | — |
data-loading | undefined | — | — |
data-nested | undefined | — | — |
data-open | undefined | — | — |
data-orientation | undefined | — | — |
data-overflow | undefined | — | — |
data-placeholder | undefined | — | — |
data-popup-open | undefined | — | — |
data-pressed | undefined | — | — |
data-readonly | undefined | — | — |
data-required | undefined | — | — |
data-scrolling | undefined | — | — |
data-selected | undefined | — | — |
data-side | undefined | — | — |
data-starting-style | undefined | — | — |
data-touched | undefined | — | — |
data-valid | undefined | — | — |
format | TimeFormat | — | What Time writes from dateTime when it has no children: the date, the clock time or both, in the locale and time
zone of the nearest LocaleProvider. Give dateTime a UTC offset (Z or +02:00) so the instant is the same on
the server and the client; an offset-less string is read in the runtime's zone. |
hourCycle | HourCycle | — | Opts a formatted time into HourCycle.H12. Defaults to HourCycle.H23, 24-hour, in every language. |
locale | string | — | BCP 47 locale for format. Defaults to the nearest LocaleProvider, then en-US. |
ref | Ref<HTMLTimeElement> | — | Ref to the time element. |
timeZone | string | — | IANA time zone for format. Defaults to the nearest LocaleProvider, then UTC. |
title | LocalizedMessage | — | Native tooltip; accessibility hint, not visible UI title text. |