Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Primitives
  2. Time
  3. API and Development

Time

API and Development

View SourceOpens in a new tabSubmit IssueOpens in a new tab
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.
Props
NameTypeDefaultDescription
dateTimestring—Machine-readable instant for the dateTime attribute (for example ISO 8601).
aria-descriptionLocalizedMessage—Extended description for assistive tech.
aria-labelLocalizedMessage—Accessible name when the visible label is insufficient.
aria-placeholderLocalizedMessage—Hint for an empty control.
childrenReactNode—Human-readable label; compose {@link Text} around Time when typography is required. Replaces format.
classNamestring—Classes appended to the host.
data-alignundefined——
data-checkedundefined——
data-copy-statusundefined——
data-dirtyundefined——
data-disabledundefined——
data-draggingundefined——
data-ending-styleundefined——
data-expandedundefined——
data-filledundefined——
data-focus-visibleundefined——
data-focusedundefined——
data-highlightedundefined——
data-hoveredundefined——
data-indeterminateundefined——
data-instantundefined——
data-invalidundefined——
data-is-newundefined——
data-loadingundefined——
data-nestedundefined——
data-openundefined——
data-orientationundefined——
data-overflowundefined——
data-placeholderundefined——
data-popup-openundefined——
data-pressedundefined——
data-readonlyundefined——
data-requiredundefined——
data-scrollingundefined——
data-selectedundefined——
data-sideundefined——
data-starting-styleundefined——
data-touchedundefined——
data-validundefined——
formatTimeFormat—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.
hourCycleHourCycle—Opts a formatted time into HourCycle.H12. Defaults to HourCycle.H23, 24-hour, in every language.
localestring—BCP 47 locale for format. Defaults to the nearest LocaleProvider, then en-US.
refRef<HTMLTimeElement>—Ref to the time element.
timeZonestring—IANA time zone for format. Defaults to the nearest LocaleProvider, then UTC.
titleLocalizedMessage—Native tooltip; accessibility hint, not visible UI title text.
Storybook
Interactive examples and edge cases for this component are in Storybook.
DefaultOpens in a new tab
Default
With styled text
Previous
Time / Usage
Next
Time / Accessibility
On this page
Props
Storybook
Default
With styled text