Timestamp
Time & Keyboard

Timestamp

Absolute timestamp cell and fixed counterpart to RelativeTime, with optional seconds, year, and monospace formatting.

Props

TimestampProps props
PropTypeDefaultDescription
dateDate—The instant to display.
secondsbooleantrueShow seconds in the time portion.
yearboolean—Show year. Defaults to true (current year is shown).
monobooleantrueMonospace + tabular figures so stacked rows align.
relativeTitlebooleantrueShow relative time on hover via the title attribute.

Examples

With seconds

Timestamp with seconds

Without seconds

Timestamp without seconds

Proportional (no mono)

Timestamp proportional
ImportTSX
import { Timestamp } from "@solarius/onset";
import type { TimestampProps } from "@solarius/onset";