RelativeTime
A moment as '3 minutes ago' in a time element, with the exact time as its title and an optional live refresh.
beta
Examples
Live examples for this component are on the way.
API
import RelativeTime from '@tcpsystems/ui/foundation/RelativeTime';| Prop | Type | Default |
|---|---|---|
value | Date | string | number | null | undefined | none |
now? | Date | string | number | none |
locale? | string | 'en-GB' |
numeric? | 'auto' | 'always' | 'auto' |
timeZone? | string | 'UTC' |
live? | boolean | false |
fallback? | string | '—' |
| Hook | Kind |
|---|---|
.tcp-time | Root class |
data-locale | Data attribute |
data-numeric | Data attribute |