Skip to content
v2.5.0
English
Русский
Documentation

Calendar

Calendar is an advanced interactive compound component for coordinated date selection across day, month, and year views.

Overview

Calendar styling is distributed across header controls, content sizing, and the day, month, and year views. Most customization should start at the theme level.

Public CSS Variables

The current implementation exposes more sizing and layout behavior than stable --calendar-* hooks. Treat theme tokens and documented size props as the primary styling surface.

SunMonTueWedThuFriSat
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
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
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
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
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
31
January
February
March
April
May
June
July
August
September
October
November
December
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
VariableValueAffects
size-dependent layout widthCalendarContent——
animated view changesviews and nav buttons——
inherited button-like sizingview buttons——

Part-Level Variables

Content

CalendarContent derives min-width from spacing tokens per size.

Navigation buttons rely on transition tokens and shared button styling patterns.

Views

CalendarDays, CalendarMonths, and CalendarYears animate view changes through shared transition tokens.

State And Variant Interaction

  • compact changes density expectations
  • size changes the content width and view spacing
  • custom day templates affect perceived density more than root styling does

Examples

Theme-first calendar tuning

.brand-theme {
  --surface-primary: var(--color-orange-0);
  --focus-color: var(--color-orange-accent-400);
}

Dense embedded calendar

compact shrinks the root to its content, and size and variant on the root reach every part through context. Shorter formats (format='short' on the month label and months, format='narrow' on the weekdays) keep the header and the month view inside the narrow width.

dense-embedded-calendar.tsx · 51 lines
import {
  Calendar,
  CalendarContent,
  CalendarDay,
  CalendarDays,
  CalendarHeader,
  CalendarMonth,
  CalendarMonthLabel,
  CalendarMonths,
  CalendarNextButton,
  CalendarPrevButton,
  CalendarViewButton,

Do Not Override

  • do not invent undocumented --calendar-* variables as if they were public API
  • do not restyle custom date cells in a way that hides focus or disabled state