FAQ
The FAQ module: 4–15 independent questions and answers in a ruled Base UI Accordion, under a chapter-stack header.
import {
FAQ,
FAQContact,
FAQHeader,
FAQIntro,
FAQItem,
FAQList,
FAQTitle,
} from '@fairgarden/design/disclosure/faq'
Questions are h3 item heads in the display serif; answers are text serif within the reading measure. The first rule is the strong top under the header, and every item closes with a rule. Each question trails the disclosure glyph, which points inward when its answer is open. Several answers may be open at once, and every answer prints expanded. Don't use an FAQ for essential content or for steps, and never open items on hover.
Ruled and barred
Ruled and barred
kind="ruled" is the default. barred adds a --border-size-2-25 bar at the start of each open item's row, a bolder line and never a fill. kind="keyed" leads each row with a block subject icon (FAQItem icon) and indents the answers; kind="split" puts the header in the left third of the page grid from 1024 px.
Visiting the preserves
Answers to the questions we hear most at the trailhead.
Still have a question? Write to the stewardship team.
Primary and secondary
Primary and secondary
primary recolors rules, questions, glyph and answers. secondary drives only the accent underlines: links inside answers and on the contact line, and a question's hover underline.
Membership
On grounds
On paper and forest
On saturated grounds keep an FAQ to five items with answers of 40 words or fewer.
paper
forest
API Reference
FAQ
The FAQ module: FAQHeader (with FAQTitle and an optional FAQIntro),
FAQList holding FAQItems, and an optional closing FAQContact. Place
it on light or deep grounds; on saturated grounds keep to five items with
answers of 40 words or fewer. Every answer prints expanded.
| Prop | Type | Description |
|---|---|---|
barred | | Shows a |
kind | |
|
primary | | Primary Radix scale: rules, questions, glyph and answers. Never defaulted; omitted, it inherits the scope [D133]. |
secondary | | Secondary Radix scale: only the link underlines inside answers and on
the contact link ( |
FAQHeader, FAQTitle and FAQIntro
The module header: the chapter-stack title, then the optional intro (§3.5 Recipe A).
The section head: type-h2 in --role-heading. Renders <h2>.
An optional lede under the title, within --fgd-measure-reading.
FAQList and FAQItem
The item list, a Base UI Accordion Root. Several items may be open at once
(multiple, default true); closed answers stay in the DOM
(hiddenUntilFound, default true) for find-in-page and print. Never
open items by hover.
One question and its answer. The question is an h3 wrapping the trigger;
the disclosure glyph trails it, top-aligned to its first line. The answer
is type-body, within --fgd-measure-reading. FAQ items are never
disabled.
| Prop | Type | Description |
|---|---|---|
icon | | The leading block icon of the |
panelProps | | Props for the answer panel, such as |
question | | The question: |
FAQContact
The optional closing contact line, e.g. “Still stuck? Write to us.” with a Link.
Additional types
FAQContactProps
Props for FAQContact: paragraph props and render.
type FAQContactProps = useRender.ComponentProps<'p'>FAQHeaderProps
Props for FAQHeader: header props and render.
type FAQHeaderProps = useRender.ComponentProps<'header'>FAQIntroProps
Props for FAQIntro: paragraph props and render.
type FAQIntroProps = useRender.ComponentProps<'p'>FAQItemProps
Props for FAQItem: Base UI Accordion Item props (without disabled) plus the question.
type FAQItemProps = {
/** The question: `type-itemhead` in `--primary12`, inside an `h3`. */
question: React.ReactNode;
/**
* The leading block icon of the `keyed` kind (§6.10 subject symbol,
* Material Symbols Rounded, block tier). Ignored by the other kinds.
*/
icon?:
| 'link'
| 'menu'
| 'search'
| 'circle'
| 'arrow_forward'
| 'arrow_upward'
| 'expand_more'
| 'close'
| 'remove'
| 'add'
| 'check'
| 'chevron_right'
| 'chevron_left'
| 'more_horiz'
| 'more_vert'
| 'play_arrow'
| 'pause'
| 'download'
| 'zoom_in'
| 'zoom_out'
| 'recenter'
| 'help'
| 'mail'
| 'content_copy'
| 'open_in_new'
| 'restart_alt'
| 'description'
| 'widgets'
| 'deployed_code'
| 'format_h2'
| 'format_h3';
/** Props for the answer panel, such as `keepMounted`. */
panelProps?: Omit<AccordionPanelProps, 'children'>;
}FAQListProps
Props for FAQList: Base UI Accordion Root props.
type FAQListProps<Value = unknown> = AccordionRoot.Props<Value>FAQProps
Props for FAQ: section props, render, and the kind, bar and color axes.
type FAQProps = React.ClassAttributes<HTMLElement> &
React.HTMLAttributes<HTMLElement> &
__type & {
kind?: 'ruled' | 'keyed' | 'split' | null;
barred?: boolean | null;
primary?:
| 'ruby'
| 'olive'
| 'sage'
| 'slate'
| 'sand'
| 'gray'
| 'mauve'
| 'brown'
| 'bronze'
| 'gold'
| 'red'
| 'crimson'
| 'tomato'
| 'pink'
| 'plum'
| 'indigo'
| 'iris'
| 'violet'
| 'purple'
| null;
secondary?:
| 'ruby'
| 'olive'
| 'sage'
| 'slate'
| 'sand'
| 'gray'
| 'mauve'
| 'brown'
| 'bronze'
| 'gold'
| 'red'
| 'crimson'
| 'tomato'
| 'pink'
| 'plum'
| 'indigo'
| 'iris'
| 'violet'
| 'purple'
| 'amber'
| 'blue'
| 'cyan'
| 'grass'
| 'green'
| 'jade'
| 'lime'
| 'mint'
| 'orange'
| 'sky'
| 'teal'
| 'yellow'
| null;
}FAQTitleProps
Props for FAQTitle: heading props and render (default <h2>).
type FAQTitleProps = useRender.ComponentProps<'h2'>Specification: DESIGN-SYSTEM.md §12.5 (FAQ) and §10.13 (accordion).