Skip to content

Faq Block

The FAQ 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.

Faq Block Heading

Faq Block Main Body

The FAQ 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 FaqBlock in your site.

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

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

Faq Block Heading

Faq Block Main Body

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

Faq Block Heading

Faq Block Main Body

PropTypeDefaultDescription
headingstringThe FAQ section heading
mainBodyRichTextNode[] | undefinedRich text content rendered below the heading
itemsFaqItemProperties[]Array of FAQ items with id, heading, and mainBody
classNamestringClass name for the root <section> element
headingClassNamestringClass name for the <h2> heading
bodyClassNamestringClass name for the body <RichText>
accordionClassNamestringClass 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.