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.
Anchor to propertiesProperties
- Anchor to dateTimedateTimestringDefault: ''
Set the time and/or date of the element.
It must be a valid date string.
TimeProps
- dateTime
Set the time and/or date of the element. It must be a [valid date string](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/time#valid_datetime_values).
string
export interface TimeProps extends Pick<TimeProps$1, 'dateTime'> {
}
Code
examples
Code
<s-time datetime="2023-10-15">October 15, 2023</s-time>
Preview

Anchor to best-practicesBest Practices
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.