Calendar
Responsive Apple Liquid Glass calendar and date picker featuring circular Apple Blue selection pills, soft continuous range bands, month/year dropdown jumps, and seamless Popover / Drawer composition.
Built on react-day-picker v10 and aligned with Apple macOS 27 and iOS 27 calendar interactions and visuals:
- Standalone Liquid Glass surface: Glass with
24pxoptical edge refraction by default, and automatically yields its background and shadow when embedded inside aPopover,Drawer, orCardto avoid double-layered glass. - Responsive touch cells: Expands to
40pxcircular touch cells on mobile (< 768px) and keeps a32pxprecision grid on desktop (>= 768px). - Constant high-contrast selection: Selected dates, range endpoints, and today indicators use high-contrast Apple Blue pills unaffected by global
--liquid-glass-tint, with a soft translucent band linking continuous ranges.
Responsive Live Preview
Supports single selection, month navigation, and localized labels; toggle the Mobile icon top-right to preview iOS 27's enlarged touch grid, or adjust the sidebar Glass Tint to observe backdrop refraction:
Installation (Shadcn Registry)
# Install via the configured @apple-liquid namespace (automatically includes button, select, liquid-surface, and liquid-glass)
npx shadcn@latest add @apple-liquid/calendarRange Selection
Shows two months side by side on desktop (numberOfMonths={2}) and automatically collapses to a single month on mobile, with circular Apple Blue endpoints and a soft connecting band:
Month & Year Dropdowns
Setting captionLayout="dropdown" renders month and year selectors using the library's built-in Liquid Glass Select: floating macOS 27 dropdowns on desktop and iOS 27 bottom Drawer lists on mobile, ideal for birthdates or cross-year navigation:
Composed Date Picker (Popover ↔ Drawer)
Pair with Popover for a zero-config responsive date picker: a floating 20px-radius Liquid Glass popover on desktop that automatically becomes a swipe-to-dismiss 32px-radius bottom Drawer on mobile:
Usage
import * as React from 'react';
import { Calendar } from '@/components/ui/calendar';
export function Example() {
const [date, setDate] = React.useState<Date | undefined>(new Date());
return (
<Calendar
mode="single"
selected={date}
onSelect={setDate}
/>
);
}Props API
Calendar
| Prop | Type | Default | Description |
|---|---|---|---|
mode | 'single' | 'multiple' | 'range' | — | Date selection mode (inherited from react-day-picker) |
locale | LiquidGlassLocaleInput | Locale | Global locale | Calendar language. A language tag ('ja', 'zh-CN', …) formats month / weekday names, week start and RTL with Intl; a react-day-picker/locale object is used as is. Defaults to <LiquidGlassProvider locale> |
glass | boolean | true | Liquid Glass material reacting to glass tint; false renders a 100% opaque surface. Auto-switches to Over-Glass on glass surfaces |
captionLayout | 'label' | 'dropdown' | 'dropdown-months' | 'dropdown-years' | 'label' | Header month/year display mode (supports dropdown jumps) |
buttonVariant | ButtonProps['variant'] | 'ghost' | Semantic variant for previous/next month buttons |
showOutsideDays | boolean | true | Whether to show leading/trailing days from adjacent months |
ButtonGroup
Merges multiple buttons into a shared Apple 27 toolbar Liquid Glass capsule by default, or joins them into a pill-ended Bordered segmented row when glass={false}.
Card
Responsive Apple Liquid Glass container card with isolated-layer glass by default (preserving internal Switch/Slider droplet refraction), edge optical refraction, opaque glass={false} mode, and automatic Over-Glass nested grouping.