Skip to content

Calendar

Browse dates in a clear, compact month view.

DateField
npx shadcn@latest add @silicon-ui/calendar

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/calendar

Manually

  1. Install the dependencies

    npm install lucide-react motion
  2. Copy these files into your project

    • components/silicon-ui/calendar/calendar.tsx
    • components/silicon-ui/calendar/calendar.module.css

    Shared with other components. Skip any you already have.

    • components/silicon-ui/lib/use-today.ts
    • components/silicon-ui/lib/fluid-hover.tsx
  3. Add the foundation, once per app, for the design and motion tokens

    npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

usage.tsx
import { Calendar } from "@/components/silicon-ui/calendar/calendar";

API reference

PropTypeDefault
valueDate—
onChange(date: Date) => void—
monthDate—
onMonthChange(month: Date) => void—
minDateDate—
maxDateDate—
disabledDatesCalendarDateMatcher—
localestring"en-US"
classNamestring—
showToday

Adds a Today button that slides back to the current month and selects today when it is available.

booleanfalse

Dependencies

npm
lucide-reactmotion
Registry
silicon-motion-tokens