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 | undefined—Displayed start date of the strip, controlled.
defaultDatestring | Date | undefined—Displayed start date of the strip, uncontrolled default.
disabled systemboolean | undefined——
getDayProps((date: DateStringValue) => MiniCalendarDayProps) | undefined—Props passed down to each day button (wins over `styles.day`).
localestring | undefined—dayjs locale used for formatting; falls back to `DatesProvider`.
maxDatestring | Date | undefined—Maximum selectable date, `YYYY-MM-DD` string or `Date`.
minDatestring | Date | undefined—Minimum 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) | undefined—Props passed to the next control button (wins over `styles.control`).
numberOfDaysnumber | undefined7Number of days shown in the strip.
onChange((date: DateStringValue) => void) | undefined—Called with the selected date in `YYYY-MM-DD` format when it changes.
onDateChange((date: DateStringValue) => void) | undefined—Called with the new start date in `YYYY-MM-DD` format when it changes.
onNext(() => void) | undefined—Called when the next button is pressed.
onPrevious(() => void) | undefined—Called 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) | undefined—Props 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> | undefined—Per-slot style sugar — props spread onto the matching styled part.
theme systemThemeName | null | undefined—Applies a theme to this element
valuestring | Date | null | undefined—Selected 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.

SlotTargets
controlProps for each prev/next control button (.Control).
dayProps for each day button (.Day).
dayMonthProps for each day's month label (.DayMonth).
dayNumberProps for each day's number (.DayNumber).
daysProps for the day strip wrapper (.Days).
rootProps for the root row (.Frame).
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.

Edit this page on GitHub