Time Stamp

Displays a formatted timestamp that can show either absolute or relative time.

Overview

dateFormat
absolute · relative
textSize
small · medium · large
textColor
secondary · primary
data
date-and-time · date · time

All options

Format and data

dateFormat \ datadate-and-timedatetime
absolute
relative

Text size and color

textSize \ textColorprimarysecondary
large
medium
small

Accessibility

Machine-readable time

TimeStamp renders a <time> element whose dateTime attribute holds the ISO date of createdAt, so the exact time is available even when the visible text is relative.

Props

PropTypeRequiredDescription
createdAtstring | number | DateYes—
dateFormat'absolute' | 'relative'Yes—
textSize'small' | 'medium' | 'large'No—
textColor'secondary' | 'primary'No—
data'date-and-time' | 'date' | 'time'No—