Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Shadcn Calendar for React and Tailwind

Select a date, dates, or a range from an inline calendar.

September 2026
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3

Installation

bunx --bun shadcn@latest add https://kit.dev/r/calendar.json

Anatomy

Calendar
├── CalendarClearTrigger
├── CalendarContent
├── CalendarControl
├── CalendarInput
├── CalendarLabel
├── CalendarMonthSelect
├── CalendarNextTrigger
├── CalendarPositioner
├── CalendarPresetTrigger
├── CalendarPrevTrigger
├── CalendarViewDate
├── CalendarTable
│   ├── CalendarTableBody
│   ├── CalendarTableCell
│   │   └── CalendarTableCellTrigger
│   ├── CalendarTableHead
│   ├── CalendarTableHeader
│   └── CalendarTableRow
├── CalendarTrigger
├── CalendarView
│   ├── CalendarViewControl
│   └── CalendarViewTrigger
└── CalendarYearSelect

Usage

import {
  Calendar,
  CalendarNextTrigger,
  CalendarPrevTrigger,
  CalendarTable,
  CalendarTableDays,
  CalendarViewControl,
  CalendarViewDate,
  CalendarWeekDays,
} from "@/components/ui/calendar";
import { Card, CardContent } from "@/components/ui/card";
<Card className="[--space:--spacing(2)]">
  <CardContent>
    <Calendar>
      <CalendarViewControl>
        <CalendarPrevTrigger />
        <CalendarViewDate />
        <CalendarNextTrigger />
      </CalendarViewControl>
      <CalendarTable>
        <CalendarWeekDays />
        <CalendarTableDays />
      </CalendarTable>
    </Calendar>
  </CardContent>
</Card>

Accessibility

KeyDescription
Enter
Activate the focused control.
Space
Activate the focused control.

Demos

Booked Dates

Controlled

Custom Cell Size

Default Value

Default View

Fixed Weeks

Locale

Max Selected

Min Max

Month Picker

Month Range

Month Year Selector

Multiple

Multiple Months

Presets

Range

Root Provider

Select Today

Week Numbers

Year Picker

Year Range

API Reference

CalendarClearTrigger

button

PropType
AttributeType

CalendarControl

div

PropType
AttributeType

CalendarLabel

label

PropType
AttributeType

CalendarMonthSelect

select

PropType
AttributeType

CalendarNextTrigger

button

PropType
AttributeType

CalendarPresetTrigger

button

PropType
AttributeType

CalendarPrevTrigger

button

PropType
AttributeType

CalendarViewDate

div

PropType
AttributeType

Calendar

div

PropType
AttributeType

CalendarTable

table

PropType
AttributeType

CalendarTableBody

tbody

PropType
AttributeType

CalendarTableCell

td

PropType
AttributeType
CSS variableType

CalendarTableCellTrigger

div

PropType
AttributeType
CSS variableType

CalendarTableHead

thead

PropType
AttributeType

CalendarTableHeader

th

PropType
AttributeType
CSS variableType

CalendarTableRow

tr

PropType
AttributeType

CalendarTrigger

button

PropType
AttributeType

CalendarView

div

PropType
AttributeType

CalendarViewControl

div

PropType
AttributeType

CalendarViewTrigger

button

PropType
AttributeType

CalendarYearSelect

select

PropType
AttributeType

CalendarTodayTrigger

PropType
AttributeType

CalendarWeekDays

PropType
AttributeType

CalendarTableDays

PropType
AttributeType

CalendarTableNextMonth

PropType
AttributeType

CalendarWeekNumberHeaderCell

th

PropType
AttributeType
CSS variableType

CalendarWeekNumberCell

td

PropType
AttributeType
CSS variableType

CalendarTableMonths

PropType
AttributeType

CalendarTableYears

PropType
AttributeType

CalendarRootProvider

div

PropType
AttributeType

useCalendar