React Calendar
A glass React calendar built on Intl, so the week starts and the month names read the way the user's locale expects.
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/calendar.jsonPick a check-in day
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
No day picked yet
Calendar
Using it in a form? See the react-hook-form and zod recipe.
Single date
The selected-day pill glides to the new day; months slide in the direction you travel. Click the caption for the month and year grids.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
Saturday, November 7, 2026
import { useState } from "react";
import { Calendar } from "@/components/sheenui/calendar/calendar";
import { GlassCard } from "@/components/sheenui/glass-card/glass-card";
// Package build (after the first npm release, or a packed tarball): import { Calendar, GlassCard } from "@sheenui/theme";
// This example also uses glass-card: npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/glass-card.json
const startOfDay = (d: Date) => new Date(d.getFullYear(), d.getMonth(), d.getDate());
export function Example() {
const [date, setDate] = useState<Date | null>(startOfDay(new Date()));
return (
<GlassCard className="max-w-full rounded-sheen-xl p-2 sm:p-3">
<Calendar value={date} onValueChange={setDate} aria-label="Pick a date" />
</GlassCard>
);
}Files to copy
5 folders · 9 files · 4 packages
- From
theme/src/ components/calendar/hooks/{use-controllable.ts, use-direction.ts, use-latest.ts, use-media-query.ts, use-preferences.ts}motion/tokens.tslib/{cn.ts, form.ts, warn-once.ts}styles/
- shadcn CLI
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/calendar.jsonRegistry item: calendar. The styles need the Tailwind v4 glass UI setup.- The examples also use
components/glass-card/motion/light-follower.tslib/heading.ts
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/glass-card.json- Packages
pnpm add @base-ui/react clsx motion tailwind-merge
Range, two months, unavailable days
Pick a start, then hover (or arrow) to preview the range; a range can't cross a booked day (every 9th and 10th here). Past days are off limits. Each caption opens the month grid for its own panel.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
Nov 10 – 15, 2026
import { useState } from "react";
import { Calendar } from "@/components/sheenui/calendar/calendar";
import { type DateRange } from "@/components/sheenui/calendar/date-utils";
import { GlassCard } from "@/components/sheenui/glass-card/glass-card";
// Package build (after the first npm release, or a packed tarball): import { Calendar, GlassCard, type DateRange } from "@sheenui/theme";
// This example also uses glass-card: npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/glass-card.json
export function Example() {
const today = new Date();
const [range, setRange] = useState<DateRange>({ start: null, end: null });
const booked = (d: Date) => d.getDate() % 9 === 0 || d.getDate() % 10 === 0;
return (
<GlassCard className="max-w-full rounded-sheen-xl p-2 sm:p-4">
<Calendar
mode="range"
numberOfMonths={2}
min={today}
isDateDisabled={booked}
value={range}
onValueChange={setRange}
aria-label="Stay dates"
/>
</GlassCard>
);
}Locales
Same component, different locale: week start, names and digits all change. Arabic also runs right to left (arrow keys follow).
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
import { useState } from "react";
import { Calendar } from "@/components/sheenui/calendar/calendar";
// Package build (after the first npm release, or a packed tarball): import { Calendar } from "@sheenui/theme";
export function Example() {
const today = new Date();
const [locale, setLocale] = useState("ar-EG");
const rtl = ["ar", "he", "fa"].includes(locale.split("-")[0] ?? locale);
return (
<div dir={rtl ? "rtl" : undefined} lang={locale}>
<button onClick={() => setLocale(locale === "ar-EG" ? "de-DE" : "ar-EG")}>Switch language</button>
<Calendar key={locale} locale={locale} defaultValue={today} aria-label="Localised calendar" />
</div>
);
}Props
CalendarLabels keys and English defaults (11)
Keyboard
Accessibility
- A WAI-ARIA date grid: role="grid" per month, one day in the tab order (roving tabindex), each day named with its full date.
- Today, selected, range start and end, and unavailable days are all in the name. Unavailable days stay focusable but cannot be selected.
- A polite live region announces month changes. Selection never relies on color alone.
When to use Calendar
- Use it as an accessible calendar for a booking page where the month grid stays on screen, such as picking a check-in and check-out range for a rental, with range mode previewing the span as the pointer or keyboard focus moves.
- Use it inside an admin scheduler or a reporting filter where people jump between months and years often, since the caption opens a month grid and then a year grid for long jumps.
- Use it for a localized product: week start, month names, weekday names and even digits come from Intl, so locale="ar-EG" or "en-GB" needs no extra configuration or translation files for the grid itself.
- Skip it when the calendar should hide behind a field in a compact form; DatePicker wraps the same grid in a popover on desktop and a bottom sheet on phones, so it fits better there.
- Pair it with Popover to build your own trigger, with Field and Label for naming the grid in a form, and with Badge or Button to show the chosen range and a clear action beside it.
Frequently asked questions
Related pages
67 components pages in all: browse them on All components.
By Lokendra Singh Rathore (GitHub, opens in a new tab). Published , updated .