MeldUI

Relative Time

Displays a human-readable relative timestamp that updates automatically.

Usage

Props

PropTypeDefaultDescription
date*Date | string | number-The reference date to display relative to now.
autoUpdatebooleantrueAutomatically refresh the displayed text on an interval.
updateIntervalnumber30000Interval in milliseconds between automatic updates.
localestring'en'Locale for the Intl.RelativeTimeFormat formatter.
asstring'time'The HTML element to render as.