category / defaultCategory / onCategoryChange"popular" (or "all" when nothing is popular)
string / string / (id) => voidThe category tab: "popular", "all" or a category id. An unknown id shows All. Searching always searches everything (the lens moves to All).
searchThreshold10
numberSearch and categories show when there are more items than this.
filtermatchGlassFaq
(item, query) => "question" | "answer" | nullSwap the matcher (e.g. fuzzy or synonyms). "question" highlights the query in the question; "answer" shows the IN ANSWER tag.
getItemIdfaqSlug(question)
(item, index) => stringIds for items without one. Ids are de-duplicated (-2, -3…); a question with no Latin letters falls back to faq-<n>. Ids are DOM ids and #hashes: prefix them when two FAQs share questions on one page.
renderCode–
(block, { item, id }) => ReactNodeRender a code block's contents (e.g. Shiki or Prism output). The glass header, COPY and the sideways scroll stay.
onCopyCode / onCopyLink–
(code, item) => void / (url, item) => voidCalled after a successful copy (analytics). Copying uses the Clipboard API, falls back to execCommand, and shows FAILED / Couldn’t copy when both fail.
syncHashtrue
booleanOpening writes #id with history.replaceState (closing clears it); on load and on hashchange a matching #id switches to All, opens and scrolls to it. false turns all of it off.
scrollOffset32
numberSpace above a deep-linked question (px), e.g. the height of your sticky header + 16.
stickyTop32
number | stringThe left column's sticky top on wide layouts.
stackBelow / singleBelow900 / 700
number / numberContainer widths (the block's own width, not the viewport): below stackBelow the left column moves above the list and categories become a sideways row; below singleBelow only one question opens at a time.
hotkeytrue
boolean"/" focuses the search (ignored while typing in a field). With several FAQs on a page it goes to the one holding focus, else the one nearest the middle of the screen, else the first.
linkComponent"a"
ElementTypeRenders the docs and contact links, e.g. Next's Link.
titleAs / questionAs"h2" / "h3"
"h1"–"h4" / "h2"–"h6"Heading levels for the title and for each question (the button sits inside the heading).
structuredDatafalse
booleanAdds schema.org FAQPage JSON-LD for text answers. glassFaqStructuredData(items) returns the same object for your own <script>.
backgroundtrue
booleanPaints the block's own background and indigo/cyan glows. false keeps it transparent over your page.
labelsdefaultGlassFaqLabels
Partial<GlassFaqLabels>Every string: eyebrow, searchPlaceholder(total), search, clearSearch, categories, popular, all, stillUnsure, contact, countWord(n, searching), countAnnouncement(n, searching), expandAll, collapseAll, inAnswer, inAnswerHint, docs, copyLink, linkCopied, linkCopyFailed, copyCode, codeCopied, codeCopyFailed, copyCodeAria(lang), code(lang), emptyTitle(query), emptyHint(contactLink), emptyContact, noItems, emptyCategory.
motion"full"
"full" | "subtle" | "off"full: the designed motion. subtle: calm curve, 30% shorter, no stagger. off: instant. prefers-reduced-motion always wins: instant layout, 150ms fades.
theme"system"
"system" | "dark" | "light"system follows a .dark / .light class or data-theme on an ancestor, else the OS.
soundtrue
boolean | "subtle"Built-in sound: true plays Lumen cues when a GlassSoundProvider (glass-sound) enables sound; false silences this instance (its cues and its clicks); "subtle" plays at 55%. Without a provider it is silent.
className / style / ref / …section props–
HTML section propsSpread on the root <section> (labelled by the title), which is also the container the layout queries.
CSS variables–
CSSOn the root or any ancestor: --glass-accent (number, glyph, bullets, lens tints; -dark / -light per theme), --glass-good / --glass-good-text (copied), --glass-faq-accent-text (-dark / -light; links, IN ANSWER, the open number in light), --glass-faq-highlight-text (light search highlight), --glass-faq-padding (default 64px 20px 120px), --glass-faq-max-width (1120px), --glass-faq-code-max-height (480px).