FAQ
Organize frequently asked questions
Use the FAQ
component to organize frequently asked questions and answers in a clear, accessible format, enhancing user experience by addressing common inquiries. You can set your FAQ items using the Accordion
component, set a heading for the section, and pass any element to display it under the heading:
- We provide 30 days of support.
- Yes!
- Hopefully.
The FAQ
block uses the Accordion
component internally. To set the FAQ items, pass an items
prop to the FAQ
component with the same structure as Accordion
items.
See the documentation of the
Accordion
component to learn more about how to use it with and without this block.
You can pass additional elements as the children to the component to render extra content next to your FAQ items. In the above example, the Tiles
block was used as the children. To read more about the Tiles
block, visit its documentation page. To set the title of the block, use the title
prop:
- We provide 30 days of support.
- Yes!
- Hopefully.
Customize HTML
By default, the title will be set using an h2
element. To change this, specify the titleTag
prop. The entire block is rendered into a section
element. This can also be customized using the element
prop:
API
Prop | Default | Purpose |
---|---|---|
element | section | Sets the HTML tag of the FAQ section. |
title | Frequently Asked Questions | Sets the title of the FAQ section. |
titleTag | h2 | Sets the HTML tag of the FAQ section's header. |
items | - | Sets the FAQ items. |
items.title | - | Sets the heading for the FAQ item. |
items.content | - | Sets the content for the FAQ item. |
items.reverse | - | Changes the order of the FAQ heading and icon. |
icon | - | Changes the style of the icon on the FAQ items. |
reverse | false | Changes the order of all FAQ headings and icons. |
className | - | Pass additional CSS classes for your FAQ component. |
Request improvement for this page