Tarikh
Reference

React Components

Use Tarikh React components when you want semantic date output and predictable accessibility.

Start Here

Import from @coreify/tarikh/react when you want semantic <time> output in React.

What You Get

ComponentUse it for
TarikhStandard date rendering
Tarikh.RelativeRelative time like today or yesterday
Tarikh.BanglaBangla calendar output
Tarikh.HijriHijri calendar output
import { Tarikh } from "@coreify/tarikh/react";

const date = "2026-03-31";

<Tarikh value={date} />
<Tarikh.Relative value={date} />
<Tarikh.Bangla value={date} locale="bn-BD" />
<Tarikh.Hijri value={date} locale="bn-BD" />

What You Get

PropBehavior
valueAccepts Date, timestamps, and date strings
srLabelOverrides the generated aria-label
aria-labelUsed when srLabel is not provided

All components render semantic <time> elements with dateTime and aria-label.

Example

import { Tarikh } from "@coreify/tarikh/react";

export function CardDate() {
  return (
    <Tarikh
      value="2026-03-31"
      locale="bn-BD"
      srLabel="Published date"
    />
  );
}

Compound Components

ComponentUse case
Tarikh.RelativeRelative time like today, yesterday, and tomorrow
Tarikh.BanglaBangla calendar output
Tarikh.HijriHijri calendar output

Notes

DetailNotes
SemanticsRenders <time> elements with dateTime and aria-label
RuntimeSSR-safe, tree-shakeable, and zero runtime dependencies beyond React
ScopeKeep React imports isolated under @coreify/tarikh/react

On this page