Skip to content
fandhe-frontend
GitHub

Calendar

fandhe-frontend-pre-styled-uicalendar mod が提供するスタイル済み Calendar 部品です。

関連 API: fandhe-frontend-pre-styled-ui API / fandhe-frontend-headless-ui API

Demo

headless-ui の Calendar(role="grid")に pre-styled-ui の recipe CSS を適用した静的掲示です。2026-07 を週開始 Monday で表示し、今日(07-22)・選択日(07-15)・表示月外セルの見た目を固定表示しています。キーボードナビゲーション・クリック挙動は wasm 層のスコープ外です。

July 2026
MoTuWeThFrSaSu

Features

  • role="grid" の月グリッド静的掲示(headless-ui の Calendar に recipe CSS を適用)
  • 今日・選択日・表示月外セルの見た目を data-* 属性連動で区別する
  • キーボードナビゲーション・クリック挙動は wasm 層のスコープ(本ページは SSR 静的表示)

Anatomy

root
  heading
  prev-trigger
  next-trigger
  table
    table-header
      table-row
        table-head-cell
    table-body
        table-cell
          day-trigger

API Reference

Arguments

NameTypeDefaultDescription
sizeSizeMd寸法 variant。
attrsVec<(&str, &str)>root パーツへ合成する追加属性。
childrenVec<Node>root 配下の子ノード(通常 Heading/Table を含む)。

Data Attributes

PartAttributeObserved Values
day-triggerdata-outside-month
day-triggerdata-selected
day-triggerdata-today
day-triggerdata-value2026-06-29, 2026-06-30, 2026-07-01, 2026-07-02, 2026-07-03, 2026-07-04, 2026-07-05, 2026-07-06, 2026-07-07, 2026-07-08, 2026-07-09, 2026-07-10, 2026-07-11, 2026-07-12, 2026-07-13, 2026-07-14, 2026-07-15, 2026-07-16, 2026-07-17, 2026-07-18, 2026-07-19, 2026-07-20, 2026-07-21, 2026-07-22, 2026-07-23, 2026-07-24, 2026-07-25, 2026-07-26, 2026-07-27, 2026-07-28, 2026-07-29, 2026-07-30, 2026-07-31, 2026-08-01, 2026-08-02

CSS Variables

VariableDefault
--fandhe-calendar-day-sizevar(--fandhe-space-8)
--fandhe-calendar-root-paddingvar(--fandhe-space-3)

Examples

2026-07 の月グリッド

週開始 Monday で、今日(07-22)・選択日(07-15)を固定表示します。

July 2026
MoTuWeThFrSaSu

Accessibility

Keyboard Interactions

KeyDescription
ArrowLeft / ArrowRight / ArrowUp / ArrowDown日付グリッド内をフォーカス移動する(wasm 層実装)。
Enter / Spaceフォーカス中の日付を選択する(wasm 層実装)。

WAI-ARIA

AttributeDescription
aria-selected選択中の日付セルに付与する。