Calendar
Browse dates in a clear, compact month view.
npx shadcn@latest add @silicon-ui/calendarInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/calendarManually
Install the dependencies
npm install lucide-react motionCopy 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
Add the foundation, once per app, for the design and motion tokens
npx shadcn@latest add @silicon-ui/silicon-foundation
Usage
API reference
| Prop | Type | Default |
|---|---|---|
value | Date | — |
onChange | (date: Date) => void | — |
month | Date | — |
onMonthChange | (month: Date) => void | — |
minDate | Date | — |
maxDate | Date | — |
disabledDates | CalendarDateMatcher | — |
locale | string | "en-US" |
className | string | — |
showTodayAdds a Today button that slides back to the current month and selects today when it is available. | boolean | false |
Dependencies
- npm
- lucide-reactmotion
- Registry
- silicon-motion-tokens