Mini Calendar
A composable mini calendar component for picking dates close to today.
Made by haydenbleaselInstallation
Loading component...
When to use
The Mini Calendar component provides compact date selection for recent dates. Use this decision tree to determine when it's appropriate:
Features
- Displays a configurable number of consecutive days (default: 5) in a compact horizontal layout
- Navigation with chevron buttons to move between date ranges by the configured number of days
- Fully composable with separate components for navigation, days container, and individual days
- Supports both controlled and uncontrolled usage with value/defaultValue and onValueChange props
- Highlights today's date with accent background and selected date with default button variant
- Built with accessibility in mind using semantic HTML and ARIA attributes
- Customizable styling through className props on all components
- Context-based state management between components using React Context
- Supports custom start dates with startDate/defaultStartDate and onStartDateChange props
Examples
Basic Usage
Loading component...
Controlled
Loading component...
Custom Layout
Loading component...
Custom Days
Loading component...
Usage
import {
MiniCalendar,
MiniCalendarDay,
MiniCalendarDays,
MiniCalendarNavigation,
} from '@/registry/components/mini-calendar'; <MiniCalendar>
<MiniCalendarNavigation direction="prev" />
<MiniCalendarDays>{(date) => <MiniCalendarDay date={date} key={date.toISOString()} />}</MiniCalendarDays>
<MiniCalendarNavigation direction="next" />
</MiniCalendar>Credits
- We take our inspiration from Kibo UI for the mini calendar component and style.
Recent changes
- patchv1.2.0Pin shipped dependency floors to the version we develop against. Registry items now declare ranges like `^5.1.9` (the actual installed version) instead of collapsing to `^5.0.0`, so consumers start on the known-tested b…#133
- minorv1.1.0Theme docs refresh, readability pass on semantic foregrounds, and consumer-facing Base UI regression fixes.#121
- minorv1.0.0Post-Base-UI polish. Public API unchanged.#116
- majorv1.0.0Migrate every Radix-based primitive to `@base-ui/react@^1.4.0` (Base UI).#114
- minorv0.3.0Add theme-provider component to the registry with documentation and tests. Includes playground type improvements (export RegistryItem, remove as-const boilerplate) and docs site dark mode border color fix.#109
Built by malinskibeniamin. The source code is available on GitHub.