Skip to content
Thrum

Mini calendar

One week as a strip of day buttons, with the month above and buttons for the week before and after. Put it above a day's agenda or a booking list, where one day at a time is the job. For a whole month use the calendar.

Install

npx shadcn@latest add @thrum-pro/mini-calendar

This is a Pro component. The command works once your project has a licence key: set up Pro or see pricing.

Automatically installs icons chevron-left and chevron-right from the icon set.

Props

PropTypeDefaultDescription
valueDate | null–The picked day, when the parent holds it. Use it with onValueChange.
defaultValueDate | nullDefault nullThe day picked at first, when the strip holds it itself.
onValueChange(value: Date) => void–Called with the day the visitor picks.
minDate | null–The earliest day that can be picked. The previous-week button stops at its week.
maxDate | null–The latest day that can be picked. The next-week button stops at its week.
weekStartsOn0 | 1 | 2 | 3 | 4 | 5 | 6–The first day of the strip, 0 for Sunday. Defaults to the locale's week from the browser, else Monday.
localestringDefault "en-US"The language of the month and weekday names.
todayDate–The day marked as today, and the week shown first when nothing is picked. The strip never reads the clock.
disabledbooleanDefault falseThe whole strip is dimmed and cannot be changed or focused.
soundbooleanDefault truePlay a click when a day is picked, if the visitor has sound on.
classNamestring–Extra classes for the root. It fills its container; the days share the width.

Motion and sound

Motion

  • A new week slides in 16 pixels from the side it comes from and fades in over 200 ms.
  • Nothing moves when the strip first appears.
  • Reduced motion: the new week appears at once.

Sound

  • A click when a day is picked. Turning the week is silent.

Sound is off until the visitor turns it on. Pass sound={false} to keep this component silent. How sound works

Accessibility

  • It follows the WAI-ARIA grid pattern with one row: one tab stop, moved by the arrow keys.
  • The row is named by the month above it, which is a polite live region, so the new month is read when the week turns into it.
  • Each day is a button named by its full date. The picked day carries aria-selected and is filled; today carries aria-current and a dot.
  • Days outside min and max keep their place in the arrow-key path, carry aria-disabled and are struck through.
  • The strip needs 180 pixels, so that every day stays a 24 pixel target; a narrower container keeps that width. The weekday names shorten with an ellipsis.
KeysAction
TabMove onto the picked day, today or the first day of the week. Tab again moves to the week buttons.
← / →The previous or next day. Past either end of the week, the strip turns to the next week.
Home / EndThe first or last day of the week.
Page Up / Page DownThe same weekday a week earlier or later.
Enter / SpacePick the focused day.

Source

SourcePro

The source comes with Pro

TypeScript source · Copy-paste ready · MIT-compatible for client projects · Includes all dependencies

Files and dependencies

Adds
components/ui/mini-calendar.tsx
Packages
None
Brings along
CalendarIcon buttonSound engine
Icons
chevron-leftchevron-right

Changelog

  1. 1.0.0 · 2026-12-03First release.

Loading index…

Keyboard shortcuts

/Ctrl KSearch components, docs and actions
?Show this list
AAppearance studio
SSound on or off
MFull or reduced motion
TTheme: auto, light, dark
GSurface: solid or frosted
BBackdrop photograph (under glass)
CCorner radius: square to round
RReplay the demo, on a component page
DDraw new data, on a component page
←→HomeEndMove the cursor in a focused chart
EscClose a dialog, or leave a chart cursor