本文へ移動
uiify

Dropdown menu

多様な項目、選択肢、サブメニューを備え、ハイドレーション前に開けるアクションメニュー。

ブラウザー
Chrome 151+
このバージョンの理由

CSS anchor positioning places this surface beside its trigger using position-anchor, and anchor(). Older Chrome versions may place the surface away from its trigger.

Firefox 151+
このバージョンの理由

CSS anchor positioning places this surface beside its trigger using position-anchor, and anchor(). Older Firefox versions may place the surface away from its trigger.

Safari 27+
このバージョンの理由

CSS anchor positioning places this surface beside its trigger using position-anchor, and anchor(). Older Safari versions may place the surface away from its trigger.

ティア
2
圧縮後のサイズ
6.43 kB
強制レイアウトの上限
0 ms
axe の上限
0
SSR 対応
はい
公開された契約
テストハーネス

プレイグラウンド

Dropdown menu

シンプルなメニュー

複合メニュー

大規模なメニュー

メニューバー

API

DropdownMenu.Bar

DropdownMenu.Root

DropdownMenu.Trigger

DropdownMenu.Content

DropdownMenu.Group

DropdownMenu.Label

DropdownMenu.Item

DropdownMenu.ItemIcon

DropdownMenu.ItemText

DropdownMenu.ItemDescription

DropdownMenu.Shortcut

DropdownMenu.ItemIndicator

DropdownMenu.Separator

DropdownMenu.CheckboxItem

DropdownMenu.RadioGroup

DropdownMenu.RadioItem

DropdownMenu.Sub

DropdownMenu.SubTrigger

DropdownMenu.SubContent

キーボード

キー操作
Enter / Space / ↓メニューを開き、最初の項目にフォーカス
↑ / ↓両端で循環しながら項目間を移動
Escape閉じてトリガーにフォーカスを戻す
Home / End最初・最後の項目へ移動
a–z入力文字に一致する項目へ移動
→ / ←サブメニューを開閉(RTLでは反転)

アクセシビリティ

ネイティブのポップオーバーは、ハイドレーション前にクリックで開きます。拡張されたキーボードナビゲーション、タイプアヘッド、チェックボックス・ラジオ項目、クリック・ホバー・矢印キーで操作するサブメニューは、ハイドレーション後に動作します。通常の項目は既定でメニューを閉じ、選択項目は開いたままにします。配置にはネイティブのCSSアンカーを使い、衝突処理は行いません。

スタイリングのフック

data-partdata-statedata-disableddata-highlighteddata-sidedata-aligndata-checkeddata-indeterminate