Empty
.is-empty placeholder state.
Month field — combobox trigger with year navigation and month grid.
Live
<div class="ui-month">
<button type="button" class="ui-month__trigger field-control" role="combobox"
aria-haspopup="dialog" aria-expanded="false" aria-labelledby="month-label">
<span class="ui-icon ui-icon--calendar ui-month__calendar" aria-hidden="true"></span>
<span class="ui-month__value">Jun 2024</span>
<span class="ui-icon ui-icon--chevron-down ui-month__chevron" aria-hidden="true"></span>
</button>
</div>
<!-- Panel: .ui-month__panel[role=dialog] with yearbar + month cells -->
import { MonthPicker } from 'caustica-design/core'
import 'caustica-design/css'
<MonthPicker
value={month}
onChange={setMonth}
placeholder="Choose month"
panelLabel="Choose month"
prevYearLabel="Previous year"
nextYearLabel="Next year"
aria-labelledby="month-label"
/>
.is-empty placeholder state.
.is-invalid validation state.
role="dialog" with panelLabel.aria-labelledby or aria-label.prev* / next* labels).| Class | Description |
|---|---|
.ui-month / .is-open / .is-empty / .is-invalid |
Root states. |
.ui-month__trigger / __value / __calendar / __chevron |
Combobox chrome. |
.ui-month__panel / __yearbar / __year / __nav |
Month dialog. |
From src/core/MonthPicker.tsx — value is YYYY-MM.
| Prop | Type | Default | Description |
|---|---|---|---|
value / onChange |
string / fn |
— | Controlled ISO-ish value (required). |
placeholder |
string |
— | Empty display text (required). |
panelLabel |
string |
— | Dialog accessible name (required). |
disabled / invalid |
boolean |
false |
Disabled / invalid states. |
aria-* |
string |
— | label, labelledby, describedby. |
prevYearLabel / nextYearLabel |
string |
— | Year nav aria-labels (required). |
monthLabels |
readonly string[] |
defaults | Optional month name array. |