Skip to main content
Mantı UI logoMantı UIv0.12.1
Studio

Calendar

Calendar is an inline month surface. Use DatePicker when selection should open from a compact field. Values are ISO date strings.

import {
  Badge,
  Button,
  Calendar,
  Heading,
  SegmentedControl,
} from '@manti-ui/react';

export default function CalendarBoard() {
  return (
    <div className="flex flex-col gap-5">
      <div className="flex items-center justify-between gap-4">
        <Heading level={2} size="xl" className="m-0">
          Calendar
        </Heading>
        <div className="flex items-center gap-3">
          <SegmentedControl
            size="sm"
            variant="primary"
            defaultValue="month"
            items={[
              { value: 'month', label: 'Month' },
              { value: 'week', label: 'Week' },
              { value: 'day', label: 'Day' },
            ]}
          />
          <Button variant="primary" size="sm">
            + New event
          </Button>
        </div>
      </div>
      <Calendar
        defaultValue={['2026-07-02']}
        renderDay={(day) =>
          day.day === 3 || day.day === 9 || day.day === 18 ? (
            <Badge variant={day.day === 18 ? 'danger' : 'primary'} size="sm">
              {day.day === 18 ? 'Review' : 'Standup'}
            </Badge>
          ) : null
        }
      />
    </div>
  );
}

Selection

Use selectionMode="single" or "range". Controlled and uncontrolled values are arrays of ISO dates.

July 2026
28
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
July 2026
28
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1

Day content

Use renderDay(day) for events or other day details. Pair it with readOnly for a display-only calendar.

September 2026
30
31
1
2Standup
3
4
5
6
7
8
9Standup
10
11
12
13
14
15
16
17
18Review
19
20
21
22
23
24
25
26
27
28
29
30
1
2Standup
3

API

PropTypeDefaultDescription
variantMantiVariant'primary'Variant for the today chip and the selection highlight.
selectionMode'single' | 'multiple' | 'range''single'Single, multiple, or range selection.
valuestring[]Controlled value as ISO date strings (YYYY-MM-DD).
defaultValuestring[]Initial value for uncontrolled usage.
onValueChange(value: string[]) => voidCalled whenever the value changes; emits ISO date strings.
localestringBCP-47 locale for weekday labels, week start, and formatting.
startOfWeeknumberDay the week starts on: 0 (Sunday) – 6 (Saturday). Defaults to the locale.
fixedWeeksbooleanfalseAlways render six week rows so the grid height stays constant.
minstringEarliest selectable date (ISO YYYY-MM-DD); earlier days render disabled.
maxstringLatest selectable date (ISO YYYY-MM-DD); later days render disabled.
disabledbooleanDisable the whole calendar.
readOnlybooleanRender the month but block selection (display-only).
namestringForm field name for the hidden input.
renderDay(day: CalendarDayValue) => ReactNodeRender custom content (e.g. events) below the day number.
actionsReactNodeContent rendered at the trailing edge of the toolbar (e.g. a view switcher).

Styling

Anatomy

PartSelectorDescription
root[data-scope="calendar"][data-part="root"]The calendar wrapper; carries data-variant.
toolbar[data-scope="calendar"][data-part="toolbar"]The Today / prev / next / month-label row above the grid.
today-trigger[data-scope="calendar"][data-part="today-trigger"]The button that jumps to today.
heading[data-scope="calendar"][data-part="heading"]The month/year label in the toolbar.
actions[data-scope="calendar"][data-part="actions"]The trailing toolbar slot (renders the actions prop).
grid[data-scope="calendar"][data-part="grid"]The bordered frame around the month grid.
day-label[data-scope="calendar"][data-part="day-label"]The day number in each cell; the today chip when data-today.
day-content[data-scope="calendar"][data-part="day-content"]Per-day content slot below the number (renderDay output).

Calendar's inner grid keeps data-scope="date-picker". Scope grid overrides under [data-scope="calendar"] to avoid changing DatePicker.

Tokens

TokenControls
--manti-calendar-day-min-heightday min height
--manti-calendar-day-paddingday padding
--manti-calendar-radiusradius

Last updated

Built end-to-end with Manti UI components and design tokens. Manti UI is a framework-agnostic design system on Zag.js.

GitHub