CSS: calendar
.instui-calendar — A static month grid with navigation, weekday headers, and day cells.
Source: calendar.css
Accessibility
Expose the grid with role="table" and a descriptive aria-label, and give each navigation button its own aria-label.
Usage
css
@import "@pantoken/components/components.css";
@import "@pantoken/components/calendar.css";Examples
html
<div class="instui-calendar" role="table" aria-label="March 2026">
<div class="nav">
<button class="instui-button -color-tertiary -shape-square -without-border -icon-chevron-left" aria-label="Previous month"></button>
<strong>March 2026</strong>
<button class="instui-button -color-tertiary -shape-square -without-border -icon-chevron-right" aria-label="Next month"></button>
</div>
<div class="grid">
<span class="weekday">Su</span>
<span class="weekday">Mo</span>
<span class="weekday">Tu</span>
<span class="weekday">We</span>
<span class="weekday">Th</span>
<span class="weekday">Fr</span>
<span class="weekday">Sa</span>
<span class="day -outside-month">23</span>
<span class="day -outside-month">24</span>
<span class="day -outside-month">25</span>
<span class="day -outside-month">26</span>
<span class="day -outside-month">27</span>
<span class="day -outside-month">28</span>
<span class="day">1</span>
<span class="day">2</span>
<span class="day">3</span>
<span class="day">4</span>
<span class="day">5</span>
<span class="day">6</span>
<span class="day -today">7</span>
<span class="day">8</span>
<span class="day">9</span>
<span class="day">10</span>
<span class="day">11</span>
<span class="day -selected">12</span>
<span class="day">13</span>
<span class="day">14</span>
<span class="day">15</span>
</div>
</div>SuMoTuWeThFrSa232425262728123456789101112131415
Structure
text
.instui-calendar
.nav
button (component)
strong
.grid
.weekday
.dayflowchart TD
n0[".instui-calendar"]:::cssdoc-root
n1(".nav"):::cssdoc-part
n2(["button"]):::cssdoc-component
n3("strong"):::cssdoc-part
n4(".grid"):::cssdoc-part
n5(".weekday"):::cssdoc-part
n6(".day"):::cssdoc-part
n1 --> n2
n1 --> n3
n0 --> n1
n4 --> n5
n4 --> n6
n0 --> n4
click n2 "/api/css/button.md"
classDef cssdoc-root stroke-width:1px;
classDef cssdoc-part stroke-width:1px;
classDef cssdoc-slot stroke-width:1px;
classDef cssdoc-component stroke-width:1px;
Parts
| Part | Description |
|---|---|
.day | A day cell; -today, -selected, and -outside-month mark its state. |
.grid | The seven-column day grid. |
.nav | The month navigation row. |
.weekday | A weekday column header. |
Tokens consumed
| Token | Type | Value |
|---|---|---|
--instui-component-calendar-background | <color> | light-dark(#ffffff, #171B21)LightDark |
--instui-component-calendar-color | <color> | light-dark(#273540, #ffffff)LightDark |
--instui-component-calendar-day-background | <color> | light-dark(#ffffff, #171B21)LightDark |
--instui-component-calendar-day-color | <color> | light-dark(#273540, #F2F4F5)LightDark |
--instui-component-calendar-day-font-size | <length> | 1rem |
--instui-component-calendar-day-height | <length> | 2rem |
--instui-component-calendar-day-min-width | <length> | 2rem |
--instui-component-calendar-day-outside-month-color | <color> | light-dark(#576773, #AAB0B5)LightDark |
--instui-component-calendar-day-selected-background | <color> | #037D37 |
--instui-component-calendar-day-selected-border-radius | <length> | 0.75rem |
--instui-component-calendar-day-selected-color | <color> | #ffffff |
--instui-component-calendar-day-today-background | <color> | light-dark(#1D354F, #EEF4FD)LightDark |
--instui-component-calendar-day-today-border-radius | <length> | 999rem |
--instui-component-calendar-day-today-color | <color> | light-dark(#ffffff, #1C222B)LightDark |
--instui-component-calendar-font-family | [ <font-family-name> | <generic-font-family> ]# | Atkinson Hyperlegible Next, "Helvetica Neue", Helvetica, Arial, sans-serif |
--instui-component-calendar-font-size | <length> | 1rem |
--instui-component-calendar-font-weight | <integer> | 600 |
--instui-component-calendar-line-height | <percentage> | 150% |
--instui-component-calendar-nav-margin | <length> | 0.75rem |
--instui-font-weight-interactive | <integer> | 500 |
--instui-spacing-space2xs | <length> | 0.125rem |