アコーディオン
ドキュメントにアコーディオンを追加します
A framework for building documentation
We love websites with a good user experience
Install to your codebase
Easier customization & control.
npx @fumadocs/cli@latest add accordion使い方
Base UI Accordion をベースにしており、FAQ セクションなどに適しています。
Radix UI 版のパッケージでは、Radix UI Accordion がベースになっています。
MDX ファイル内でも、通常の React コンポーネントとしても使用できます。
---
title: Hello World
---
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
<Accordions type="single">
<Accordion title="My Title">My Content</Accordion>
</Accordions>Accordions
プロパティ
型
Accordion
プロパティ
型
アコーディオンへのリンク
アコーディオンには id を指定できます。URL のハッシュに指定した id を含めてユーザーがページにアクセスすると、そのアコーディオンが自動的に開きます。
<Accordions>
<Accordion title="My Title" id="my-title">
My Content
</Accordion>
</Accordions>アコーディオンの値は、デフォルトではタイトルと同じです。id が指定されている場合は、代わりに id が値として使用されます。
How is this guide?
最終更新日
