Root Props
| Prop | Type | Default |
|---|---|---|
variant | CalendarBaseVariant | 'secondary' |
Visual variant for the calendar. Propagated through CalendarBaseContext and used by nested controls (buttons, labels, etc.) to keep styling consistent. | ||
size | CalendarBaseSize | 'xs' |
Global size scale for the calendar. Affects nested controls such as navigation buttons, picker triggers, and week labels via CalendarBaseContext. | ||
compact | boolean | — |
Density flag for more compact layouts. When true, the root element receives data-compact="true", allowing styles to reduce paddings, gaps, and control heights for a denser calendar presentation. When false or undefined, the calendar uses the default spacing. | ||
Also accepts all <div> attributes.
Child Parts
CalendarBaseHeaderCalendarBaseWeekLabelsCalendarBaseWeekLabelCalendarBasePickerButtonCalendarBaseControlIconButton
CalendarBaseHeader
Also accepts all <div> attributes.
CalendarBaseWeekLabel
| Prop | Type | Default |
|---|---|---|
size | TextSize | — |
| Visual size of the text, typically mapped to the design system’s type scale. | ||
asChild | boolean | — |
If true, renders the text as a child component using Slot. Useful for compatibility with native elements or other components. | ||
fontWeight | 400 | 500 | 600 | 700 | 900 | — |
| Font weight applied to the text. Common values: 400: Regular; 500: Medium; 600: Semi-bold; 700: Bold; 900: Extra bold | ||
ref | Ref<HTMLSpanElement> | — |
Ref to the underlying <span> or slotted element. Useful for measuring, focusing, or DOM manipulation. | ||
Also accepts all <span> attributes.
CalendarBaseWeekLabels
Also accepts all <div> attributes.
CalendarBasePickerButton
| Prop | Type | Default |
|---|---|---|
asChild | boolean | — |
When true, renders the button as a child component using Slot (e.g., from Radix UI). Enables polymorphic rendering — useful for making the button act as a link or custom tag. | ||
size | ButtonSize | — |
| Defines the size of the button. Affects padding, font size, and overall dimensions. | ||
fullWidth | boolean | — |
| When true, the button expands to fill the width with its container. | ||
variant | ButtonBaseVariant | — |
| Defines the visual style of the button, affecting color schemes and emphasis. | ||
appearance | ButtonBaseAppearance | — |
| Adjusts the button's structural appearance (background, border, etc.). | ||
disabled | boolean | — |
Disables the button when true. Prevents user interaction and applies a visually disabled state. Not applied with asChild: the child element owns its disabled state, for example, aria-disabled or a link without href. | ||
className | string | — |
| Optional custom CSS class for the button element. Useful for design system overrides or scoped styles. | ||
children | ReactNode | — |
| Content of the button — text, icon, or any React node. | ||
ref | Ref<HTMLButtonElement> | — |
Ref forwarded to the native <button> element. Allows direct DOM access for focus management or measuring. | ||
Also accepts all <button> attributes.
CalendarBaseControlIconButton
| Prop | Type | Default |
|---|---|---|
size | IconButtonSize | — |
| Size of the button container. Controls padding and overall clickable area. | ||
asChild | boolean | — |
When true, renders the button as a child component using Slot (e.g., from Radix UI). Enables polymorphic rendering — useful for making the button act as a link or custom tag. | ||
variant | ButtonBaseVariant | — |
| Defines the visual style of the button, affecting color schemes and emphasis. | ||
appearance | ButtonBaseAppearance | — |
| Adjusts the button's structural appearance (background, border, etc.). | ||
disabled | boolean | — |
Disables the button when true. Prevents user interaction and applies a visually disabled state. Not applied with asChild: the child element owns its disabled state, for example, aria-disabled or a link without href. | ||
className | string | — |
| Optional custom CSS class for the button element. Useful for design system overrides or scoped styles. | ||
children | ReactNode | — |
| Content of the button — text, icon, or any React node. | ||
ref | Ref<HTMLButtonElement> | — |
Ref forwarded to the native <button> element. Allows direct DOM access for focus management or measuring. | ||
Also accepts all <button> attributes.
Types
CalendarBasePropsCalendarBaseHeaderPropsCalendarBaseWeekLabelsPropsCalendarBaseWeekLabelPropsCalendarBasePickerButtonPropsCalendarBaseControlIconButtonPropsCalendarBaseVariantCalendarBaseSize
State Model
CalendarBasehas no date-selection state of its own.- It only shares visual context for nested calendar-family parts.