Taqwim
- Adapters
- Vue 3 · React · Svelte 5 · Solid · Angular
- Covers
- 1343–1500 AH, tabulated from Umm al-Qura
- Ships
- Headless behaviour, 33 optional themes, no CSS by default
pnpm add @taqwim/vue-styled@alphapnpm add @taqwim/react-styled@alphapnpm add @taqwim/svelte-styled@alphapnpm add @taqwim/solid-styled@alphapnpm add @taqwim/angular-styled@alphanothing yet Tab into the grid, then use the arrow keys, Home/End, PageUp/PageDown (with Shift for years) and Enter to select. Under dir="rtl" the horizontal keys mirror.
nothing yetTab into the grid, then use the arrow keys, Home/End, PageUp/PageDown (with Shift for years) and Enter to select. Under dir="rtl" the horizontal keys mirror.
nothing yetTab into the grid, then use the arrow keys, Home/End, PageUp/PageDown (with Shift for years) and Enter to select. Under dir="rtl" the horizontal keys mirror.
nothing yetTab into the grid, then use the arrow keys, Home/End, PageUp/PageDown (with Shift for years) and Enter to select. Under dir="rtl" the horizontal keys mirror.
No live Angular island here. @analogjs/vite-plugin-angular does not compile an Angular app under Vite 8, which is the same gap that keeps Angular out of the default end-to-end run.
The adapter itself is built and type-checked by ngc with strictTemplates on every change, and playground/angular runs with pnpm --filter taqwim-playground-angular dev.
Not a screenshot, and not a reimplementation. That is the published package for the framework selected above, rendered on this page — switch frameworks and the calendar is rebuilt from a different one.
Two packages per framework
Section titled “Two packages per framework”A headless package with the behaviour and the ARIA, and a styled package if you want it to look like a calendar out of the box. The styled one is built entirely from the headless one’s public parts, so dropping down a level costs you nothing and adds no dependency.
Grid building, selection, paging, keyboard navigation and every emitted data-*
and aria-* attribute live in one framework-free state machine. The five
adapters are bindings to it, not five implementations of it — which is why a
calendar bug is one fix rather than five, and why the end-to-end suite is
written against the DOM alone and runs unchanged on all of them.
Or none of them
Section titled “Or none of them”The date maths is its own package with no framework and no DOM.
import { toHijri, addHijriBusinessDays, formatHijriDate } from '@taqwim/core'
toHijri('2026-08-26') // { hy: 1448, hm: 3, hd: 13 }addHijriBusinessDays({ hy: 1448, hm: 9, hd: 2 }, 3) // skips Friday and SaturdayformatHijriDate({ hy: 1448, hm: 3, hd: 13 }, 'iD iMMMM iYYYY', 'ar')//=> "13 ربيع الأول 1448"The working week runs Sunday to Thursday across most of the Arab world, so business-day arithmetic defaults to a Friday/Saturday weekend — overridable per call, never global.
What it will not do
Section titled “What it will not do”Conversion is table-driven from the Umm al-Qura data, which makes it exact
between 1343 and 1500 AH (1 August 1924 to 16 November 2077) and impossible
outside it. Ask for a date beyond the table and Taqwim throws HijriRangeError
rather than returning a plausible wrong answer.
Dates matter to the people reading them. A library that quietly guesses is worse than one that stops, so this one stops — and says exactly where the edges are.
Themed with one attribute
Section titled “Themed with one attribute”Thirty-three themes over a custom-property contract, framework-free because they
are keyed off the attributes the state machine emits. Set
data-taqwim-theme="islamic" on any ancestor and everything below it changes;
a single page can host several and switch at runtime.
Every bundled theme is measured against WCAG AA on each test run — not asserted in a README, measured, with the failures that audit originally found written down.
With thanks
Section titled “With thanks”Taqwim was inspired by luxon-hijri by Aric Camarata — a table-based Umm al-Qura implementation for Luxon, and the project that made the case that a Hijri calendar should be tabulated and bounded rather than approximated. Taqwim takes that premise somewhere else: no Luxon dependency, and an accessible calendar for five frameworks on top of the date maths. Both are MIT.