Relative Time
llms.txtExample
10s
This component is unstyled by default.
Usage
<RelativeTime date={new Date(Date.now() - 10000)} locale="en-US" />
API Reference
RelativeTime
Displays a timestamp as a human-readable relative time string (e.g. "5 minutes ago") that updates live.
Property Type Description
date required
union
The date to display relative to now. Can be a Date object or a Unix timestamp.
locale required
string
The locale for formatting (e.g. 'en', 'de').
live
boolean
Whether to automatically update the displayed time. Default:
trueclass
string
Additional CSS classes to apply. Default: —
Property
date
locale
live
class