Calendar
calendarA month grid for a single date or a range, with no date library. Full WAI-ARIA keyboard support, min, max and disabled days, a range that previews under the pointer, and a fixed six-week height so nothing below it jumps.
"use client";
import { useState } from "react";
import { Calendar } from "@/components/forme/calendar/calendar";
import type { DateRange } from "@/components/forme/calendar/calendar";
const fmt = new Intl.DateTimeFormat("en-US", { month: "short", day: "numeric" });
export function CalendarDemo() {
const [today] = useState(() => new Date());
const [date, setDate] = useState<Date>(today);
const [range, setRange] = useState<DateRange>({
from: new Date(today.getFullYear(), today.getMonth(), today.getDate() + 3),
to: new Date(today.getFullYear(), today.getMonth(), today.getDate() + 8),
});
return (
<div className="flex flex-wrap gap-6">
<div className="rounded-xl border border-border bg-card p-4 shadow-xs">
<Calendar selected={date} onSelect={setDate} weekStartsOn={1} />
<p className="mt-3 border-t border-border pt-3 text-caption-1-regular text-muted-foreground">
Due {fmt.format(date)}
</p>
</div>
<div className="rounded-xl border border-border bg-card p-4 shadow-xs">
<Calendar
mode="range"
selected={range}
onSelect={setRange}
min={today}
isDisabled={(day) => day.getDay() === 0 || day.getDay() === 6}
/>
<p className="mt-3 border-t border-border pt-3 text-caption-1-regular text-muted-foreground">
{range.to
? `${fmt.format(range.from)} – ${fmt.format(range.to)} · weekdays only`
: `From ${fmt.format(range.from)}, pick an end date`}
</p>
</div>
</div>
);
}Install
Adds the component, its registry dependencies, and the token stylesheet you import once.
API reference
Read from the source, so it is the API of the file you install. A prop marked * is required.
Calendar
A month grid for picking a date or a range.
| Prop | Type | Default | Description |
|---|---|---|---|
mode | "single" | — | |
selected | Date | DateRange | — | |
onSelect | (date: Date) => void | — | |
defaultMonth | Date | — | The month shown first. Defaults to the selection, or today. |
weekStartsOn | 0 | 1 | 0 | 0 is Sunday, 1 is Monday. |
min | Date | — | |
max | Date | — | |
isDisabled | (date: Date) => boolean | — | Return true for any date that cannot be picked: weekends, booked days. |
locale | string | "en-US" | |
className | string | — |
Related


File Dropzone
A drop target that is also a real file picker, so click, keyboard and drag all work. Checks type and size on drop as well as in the picker, and reports each rejected file by name.
inputs

Input
A text field with a real label, optional description, an error that is announced and wired up with aria-describedby, and room for an icon on either side. Sizes and the invalid state come from the same tokens as every other Forme surface.
inputs

Multi Select
Choose several options from a long list: removable chips you can type into to filter, over a list where each option toggles. Groups, a max with a counter, Backspace and arrow keys through the chips, and plain form submission — on Base UI's Combobox.
inputs