Skip to content

Faq One

The FAQ One block is a composable section that renders a heading, rich text body, and a list of expandable question/answer items. It is built on top of the Accordion and RichText components.

Frequently Asked Questions

Find answers to common questions about getting started, customization, and best practices.

The FAQ One block composes the following components:

ComponentRole
RichTextRenders the block body and each FAQ item answer
AccordionRenders the expandable question/answer list

Below is an example of how to use the FaqOne in your site.

import { FaqOne } from "@/rokkit200-ui/blocks/faq/variants/faq-one/faq-one";
import { mapCmsType } from "@/rokkit200-ui/lib/content-mapper/content-mapper-util";
import { faqCmsMappers } from "@/rokkit200-ui/blocks/faq/faq-one/internals/lib/faq-utils";
const properties = mapCmsType(faqCmsMappers, faqResponse);
return <FaqOne {...properties!} />;

Use className overrides to constrain width and reduce text size for a compact FAQ presentation.

Frequently Asked Questions

Find answers to common questions about getting started, customization, and best practices.

Use the className, headingClassName, bodyClassName, and accordionClassName props to customise the appearance.

Frequently Asked Questions

Find answers to common questions about getting started, customization, and best practices.

PropTypeDefaultDescription
headingstring—The FAQ section heading
mainBodyRichTextNode[] | undefined—Rich text content rendered below the heading
itemsFaqItemProperties[]—Array of FAQ items with id, heading, and mainBody
classNamestring—Class name for the root <section> element
headingClassNamestring—Class name for the <h2> heading
bodyClassNamestring—Class name for the body <RichText>
accordionClassNamestring—Class name for the <Accordion> wrapper
  • The root element is a <section> with aria-labelledby referencing the heading.
  • Each FAQ item is rendered as an accordion panel with proper ARIA attributes, keyboard navigation, and focus management provided by Base UI.
  • The heading is rendered as an <h2> element.