開閉
Collapse
Collapse — animates showing/hiding content by height. Pair the toggling control with `aria-expanded` and `aria-controls` pointing at this element's `id`.
日本語の説明は準備中です。いまは英語を表示しています。
ReactVueWeb Components
Storybook で見る プレイグラウンド
使用例
<button aria-expanded={open} aria-controls="c1" onClick={() => setOpen(!open)}>
Toggle
</button>
<Collapse id="c1" open={open}>content</Collapse> 設定できる項目
| 名前 | 型 | 既定値 | 説明 |
|---|---|---|---|
open 必須 | boolean | — | Whether the content is expanded. |
アクセシビリティ
- 文字と背景の明るさの差をしっかり取り、読みやすくしています。ライトでもダークでも、見やすさの国際基準 WCAG の最高ランク AAA(明るさの差が 7:1 以上)を満たします。
- マウスがなくても、キーボードだけですべての操作ができます。
- いまどこを操作しているかを示す枠(フォーカスの囲み)が、常にはっきり見えます。
- 利用者が「画面の動きを減らす」設定にしているときは、過剰なアニメーションを止めます。
どのコンポーネントも、だれにとっても使いやすいように、見やすさの国際基準 WCAG の最高ランク AAA(WCAG 2.1 AAA)を満たすよう作っています。