Knit UI
GitHub

Playground

Loading playground…

Playground
<MiniCalendar
  numberOfDays={7}
  size="md"
/>

Examples

Default

Default 7-day strip.

Loading example…

DefaultSourceStorybook

Crossing Months

A longer 10-day window that crosses a month boundary (note the month labels).

Loading example…

Crossing MonthsSourceStorybook

Bounded

Bounded — paging is blocked once the window would leave [minDate, maxDate].

Loading example…

BoundedSourceStorybook

Styles Sugar

Per-slot styles sugar — recolour/round parts without composing them by hand.

Loading example…

Styles SugarSourceStorybook

Theme Accent

Theme accent — theme="red" recolours the selected day with zero per-component logic.

Loading example…

Theme AccentSourceStorybook

Sizes

Every size token.

Loading example…

SizesSourceStorybook

Props

PropTypeDefaultDescription
datestring | Date | undefinedDisplayed start date of the strip, controlled.
defaultDatestring | Date | undefinedDisplayed start date of the strip, uncontrolled default.
disabled systemboolean | undefined
getDayProps((date: DateStringValue) => MiniCalendarDayProps) | undefinedProps passed down to each day button (wins over `styles.day`).
localestring | undefineddayjs locale used for formatting; falls back to `DatesProvider`.
maxDatestring | Date | undefinedMaximum selectable date, `YYYY-MM-DD` string or `Date`.
minDatestring | Date | undefinedMinimum selectable date, `YYYY-MM-DD` string or `Date`.
monthLabelFormatstring | undefined'MMM'dayjs format string for the month label.
nextControlProps(Omit<GetFinalProps<RNTamaguiViewNonStyleProps, StackStyleBase, { disabled?: boolean | undefined; shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined; }>, keyof UnstyledButtonProps> & UnstyledButtonProps) | undefinedProps passed to the next control button (wins over `styles.control`).
numberOfDaysnumber | undefined7Number of days shown in the strip.
onChange((date: DateStringValue) => void) | undefinedCalled with the selected date in `YYYY-MM-DD` format when it changes.
onDateChange((date: DateStringValue) => void) | undefinedCalled with the new start date in `YYYY-MM-DD` format when it changes.
onNext(() => void) | undefinedCalled when the next button is pressed.
onPrevious(() => void) | undefinedCalled when the previous button is pressed.
previousControlProps(Omit<GetFinalProps<RNTamaguiViewNonStyleProps, StackStyleBase, { disabled?: boolean | undefined; shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined; }>, keyof UnstyledButtonProps> & UnstyledButtonProps) | undefinedProps passed to the previous control button (wins over `styles.control`).
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
size systemCalendarSize | undefined
xs · sm · md · lg · xl
'md'Width/font of the controls and day cells.
styles systemSlotStyles<MiniCalendarStyles> | undefinedPer-slot style sugar — props spread onto the matching styled part.
theme systemThemeName | null | undefinedApplies a theme to this element
valuestring | Date | null | undefinedSelected date, controlled.

Style slots

Every part of MiniCalendar can be styled through the styles prop. Explicit props on the component always win over slot styles.

SlotUsage
controlstyles={{ control: { … } }}
daystyles={{ day: { … } }}
dayMonthstyles={{ dayMonth: { … } }}
dayNumberstyles={{ dayNumber: { … } }}
daysstyles={{ days: { … } }}
rootstyles={{ root: { … } }}
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<TamaguiElement> | undefined

Plus 497 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.