Skip to content

Properties

PropertyTypeDescription
valueDate
string
(optional) The date that will be formatted.
dateStylelong
medium
short
full
(optional) Defines the style used to format the date. Also affects duration formatting when using ISO 8601 duration strings. Defaults to long.
relativeTimeboolean(optional) If set to true, actual dates will be formatted as relative time (e.g., "2 hours ago"). ISO 8601 duration strings (e.g., "PT1H") are automatically detected and formatted without this prop. Defaults to false.
localestring(optional) A string in Intl.DateTimeFormat locale format. Duration formatting supports all locales using the browser's built-in internationalization. Defaults to nb-NO.
skeletonboolean(optional) If set to true, an overlaying skeleton with animation will be shown.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.