Skip to content
tcpsystemsui

Theme

Colour scheme
Accent
Density
Radius
Esc

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
import RelativeTime from '@tcpsystems/ui/foundation/RelativeTime';
PropTypeDefault
valueDate | string | number | null | undefinednone
now?Date | string | numbernone
locale?string'en-GB'
numeric?'auto' | 'always''auto'
timeZone?string'UTC'
live?booleanfalse
fallback?string'—'
HookKind
.tcp-timeRoot class
data-localeData attribute
data-numericData attribute