Time
A moment in the language of the page: «3 hours ago» that keeps itself current, or a date. The exact date is always on hover.
import { Time, TimeSkeleton } from '@sypnia/ui/react'
On this page
Four ways
Hover to see the exact date.
- relative
- date
- dateTime
- time
Code
import { KeyValue, Time } from '@sypnia/ui/react';
const t = '2026-11-17T09:00:00Z';
// The same moment, four ways. Hover any of them: the exact date is always one look away.
export default function Ways() {
return (
<KeyValue items={[
['relative', <Time key="r" value={t} />],
['date', <Time key="d" value={t} as="date" />],
['dateTime', <Time key="dt" value={t} as="dateTime" />],
['time', <Time key="t" value={t} as="time" />],
]} />
);
} Skeleton
The real piece and its skeleton: the same box, so nothing moves when the data arrives.
Updated · Updated
Code
import { Time, TimeSkeleton } from '@sypnia/ui/react';
export default function Skeleton() {
return <p className="sy-row">Updated <Time value="2026-11-17T11:58:00Z" /> · Updated <TimeSkeleton /></p>;
} When to use it
Use it when
- Any date or time the person reads.
Do not use it when
- The person picks a date: DatePicker.
For everyone
- It is a
timeelement with the exact moment, so machines and screen readers get it whole.
Props
| Time | Type | Default |
|---|---|---|
valuerequired | string | number | Date | |
as | "date" | "time" | "relative" | "dateTime" | relative |