FAQ
Multi-Open Accordion
An accordion where any number of answers can stay open at once.
#accordion#faq#multiple
6 個のフレームワーク中級
An accessible accordion where one answer opens at a time.
<!--
<details name="faq"> gives an exclusive accordion natively: keyboard operable,
screen-reader announced, and open by default for print and no-JS.
-->
<div class="faq">
<h2 class="faq__heading">Frequently asked questions</h2>
<details class="faq__item" name="faq" open>
<summary class="faq__question">
Can I change my plan later?
<svg class="faq__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="faq__answer">
<p>Yes. Upgrades apply immediately and downgrades take effect at the end of the current billing period.</p>
</div>
</details>
<details class="faq__item" name="faq">
<summary class="faq__question">
Do you offer refunds?
<svg class="faq__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="faq__answer">
<p>We refund any annual plan in full within 30 days of purchase, no questions asked.</p>
</div>
</details>
<details class="faq__item" name="faq">
<summary class="faq__question">
Is there a free tier?
<svg class="faq__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="faq__answer">
<p>Yes - the free tier includes three projects and never expires. No card required.</p>
</div>
</details>
</div>| Prop | 型 | デフォルト | 説明 |
|---|---|---|---|
items必須 | FaqItem[] | - | レンダリングする項目の配列。 |
allowMultiple | boolean | false | 複数の項目を同時に開けるようにします。 |
defaultOpenId | string | - | マウント時に展開する項目の ID。 |
className | string | - | ルート要素にマージされる追加クラス。 |
Feed it an array of question/answer pairs. Keep the `aria-expanded` and `aria-controls` wiring intact - it is what makes the control announce correctly to a screen reader.