FAQ Accordion
An accessible accordion where one answer opens at a time.
6 個のフレームワーク中級
Each question is a detached card, separated by whitespace instead of dividers.
<!--
Each question is its own detached card with a gap between them, so there are
no dividers at all - the whitespace does the separating.
-->
<div class="acc-sep">
<details class="acc-sep__item" open>
<summary class="acc-sep__question">
How long does setup take?
<svg class="acc-sep__icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
<path d="m5 7.5 5 5 5-5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</summary>
<div class="acc-sep__answer">
<p>Most teams are importing data within an hour. The guided setup walks you through it step by step.</p>
</div>
</details>
<details class="acc-sep__item">
<summary class="acc-sep__question">
Can I migrate from another tool?
<svg class="acc-sep__icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
<path d="m5 7.5 5 5 5-5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</summary>
<div class="acc-sep__answer">
<p>Yes. We import CSV exports from every major competitor, and our team will run the migration for you on annual plans.</p>
</div>
</details>
<details class="acc-sep__item">
<summary class="acc-sep__question">
Is training included?
<svg class="acc-sep__icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
<path d="m5 7.5 5 5 5-5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</summary>
<div class="acc-sep__answer">
<p>Every plan includes live onboarding sessions and unlimited access to the course library.</p>
</div>
</details>
</div>| Prop | 型 | デフォルト | 説明 |
|---|---|---|---|
items必須 | FaqItem[] | - | レンダリングする項目の配列。 |
allowMultiple | boolean | true | 複数の項目を同時に開けるようにします。 |
defaultOpenId | string | - | マウント時に展開する項目の ID。 |
className | string | - | ルート要素にマージされる追加クラス。 |
Gaps rather than dividers, which suits marketing pages where each answer should read as its own object. It defaults to `allowMultiple` because detached cards do not visually imply a group - set it to `false` for exclusive behaviour. Adjust the rhythm with `space-y-3` and keep the card radius on both the wrapper and the button so the focus ring follows the corner.