Skip to main content

Time

Represents a specific point or duration in time. Use to display dates, times, or durations clearly and consistently. May include a machine-readable datetime attribute for improved accessibility and functionality.

string
Default: ''

Set the time and/or date of the element.

It must be a valid date string.

Was this section helpful?

Code

<s-time datetime="2023-10-15">October 15, 2023</s-time>

Preview

  • Use Time component for displaying time values to ensure consistent formatting.

  • Provide time values in a clear, readable format.

  • Consider using 24-hour format for international audiences.

  • Include timezone information when relevant.

  • Use Time component for any time-related content to maintain semantic meaning.

Was this section helpful?