Prepared Docs

Prepared Docs

⌘K

    Loading navigation…

User

  1. Primitives
  2. Time
  3. API and Development

Time

API and Development

View Source
Submit Issue

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 CoreText around Time when the label needs styling, since CoreText has no as/asChild prop and cannot render <time> itself.

Props

Name

Type

Default

Description

dateTime

string

—

Machine-readable instant or date for the dateTime attribute, e.g. an ISO 8601 timestamp.

className

string

—

Additional CSS class name applied to the <time> element.

ref

Ref<HTMLTimeElement>

—

Ref forwarded to the underlying <time> element.

Storybook

Interactive examples and edge cases for this component are in Storybook.

Default

Default

With styled text

Previous

Time / Usage

Next

Time / Accessibility

On this page

Props
Storybook
Default
With styled text