React Components
Optional React entry point for SSR-safe date output.
React Components
The React entry point is optional. Import from @coreify/tarikh/react only when you need components.
import { Tarikh } from "@coreify/tarikh/react";
<Tarikh value={new Date()} />
<Tarikh.Relative value={new Date()} />
<Tarikh.Bangla value={new Date()} locale="bn-BD" />All components render semantic <time> elements with dateTime and aria-label attributes. They are SSR-safe, tree-shakeable, and have zero runtime dependencies beyond React.
What Intl.DateTimeFormat cannot do
If you are building for Bangladesh, existing libraries are not enough.
| Feature | Intl | @coreify/tarikh |
|---|---|---|
| Bangla calendar conversion | No | Yes |
| Bangla digits in dates | Partial | Yes |
| Hybrid formatting | No | Yes |
| Bangla calendar parsing | No | Yes |
| Relative time in Bangla | No | Yes |
| SSR-safe React components | N/A | Yes |