animui
ComponentsBlocksDocsPackageTry the demo
Introduction
Installation
Theming
Motion
AI guide
Changelog
Metrics dashboard
KPI drilldown
Metric explorer
Revenue explorer
MRR waterfall
Cohort retention
Usage forecast
Journey flow
Choropleth explorer
Connected scatter
Market terminal
Budget variance
Small multiples
Line replay
AI chat
AI composer
Agent run
AI side panel
SidebarPro4
Page header
Command palette
Notification center
Empty states
Search resultsPro
Login and sign up5
OTP input
Multi-step formPro
Settings page
Settings command
Security settings
Billing overview
Usage billing
Cancel flow
Team members
Invite people
Team directory
Roles and permissions
API keys
Webhooks
Integrations
Environment variables
Plan comparison
Pricing calculatorPro
Usage pricingPro
Cart drawerPro
Checkout summaryPro
Invoice studio
Wallet card
Product listing
Product detail
Inbox triage
Support conversation
Support widget
Help centerNew
File upload
Media playerPro
Week calendar
Availability picker
Project board
Release readiness
Kanban boardNew
Hero section
Hero signupPro
Scroll storyPro
Spotlight gridPro
Feature bentoPro
Comparison table
Logo marquee
Studio perspectivesPro
Stats band
Changelog feed
FAQ section
Contact section
Team showcasePro
Blog grid
Site header
Site footer
CTA section
Newsletter signup
Activity terrain
Revenue globe
Customer galaxy
Semantic zoom
Layout morph
What’s new8 new
BlocksFAQ section

FAQ section

FAQs as an accordion, a topic rail, or a searchable list that highlights matches.

npm install https://animui.stracture.net/__local/package.tgz
Live block · sample data

When to use

  • FAQ sections on pricing, product, and support pages.
  • Long FAQs that benefit from categories or live search.

When not to use

  • Use accordion for generic collapsible content that is not a question list.
  • Use a docs page when answers need code, images, or long structure.

Installation

Install animui once, then import any component or block from its typed package entry.

animui · 250 components and blocks

React 19 and React DOM 19 are required. The package includes Free and Pro entries, styles and TypeScript declarations.

npm install https://animui.stracture.net/__local/package.tgz

Load the stylesheet once at your app root, then use the typed component import:

import 'animui/styles.css';
import { FaqSection } from 'animui/faq-section';

Read the Code tab for the implementation files and the API reference below for required props.

Download animui 0.3.0 · Agent guide

Usage

Use this as a starting point and replace the sample data with your own.

example.tsx
1import { FaqSection } from "animui/faq-section";2 3export function PricingFaq() {4  return (5    <FaqSection6      variant="search"7      title="Questions about billing"8      items={[9        { question: "Can I cancel anytime?", answer: "Yes. Your plan stays active until the end of the billing period." },10        { question: "Do you offer refunds?", answer: "We refund annual plans within 14 days of purchase." },11      ]}12      contact={{ label: "Talk to billing", href: "mailto:billing@example.com" }}13    />14  );15}
Built fromMotion

API reference

2 parts. The first is the root.

FaqSection

An FAQ in three layouts: one centered accordion, questions grouped beside a category rail, or a list that filters as you type.

PropTypeDefaultDescription
variant"accordion" | "columns" | "search""accordion"Layout.
titlestring"Frequently asked questions"Section heading.
descriptionstring–One line under the heading.
items{ id?: string; question: string; answer: string; category?: string }[]faqExampleItemsQuestions. answer is plain text and is what search matches. category groups the columns variant.
multiplebooleanfalseAllow several answers open at once.
valuestring[]–Open item ids (controlled). Ids default to the question.
defaultValuestring[]–Initially open ids when uncontrolled.
onValueChange(value: string[]) => void–Called when answers open or close.
categorystring–Active category in the columns variant (controlled).
onCategoryChange(category: string) => void–Called when the category changes.
querystring–Search text in the search variant (controlled).
onQueryChange(query: string) => void–Called as the search text changes.
contact{ label: string; description?: string; href?: string; onClick?: () => void } | null–A way to reach a person when the answer isn't here. Pass null to hide it.
classNamestring–Extra class on the section.

FaqSectionBlock

Default export: a preview with a layout switcher.

PropTypeDefaultDescription
variantFaqSectionVariant"accordion"Initial variant.

Keyboard interactions

ArrowUporArrowDown
Move between questions in one list.
HomeorEnd
First or last question.
EnterorSpace
Opens or closes the focused answer.

Accessibility

  • Questions are buttons with aria-expanded controlling their answer region.
  • Search matches are wrapped in mark elements; closed items that match only in the answer show a short excerpt.
  • The search variant uses animui SearchField with a real label.

Motion

  • Answers open with height and opacity together and the plus icon turns.
  • Filtering and category changes move remaining items with layout animation.
  • Reduced motion opens and filters instantly.

Responsive behavior

  • Container queries: below 760px the category rail becomes a horizontal scrolling row above the questions; below 480px padding tightens.

Performance

  • Search filters in memory on each keystroke; fine for dozens of items, not thousands.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

  • Keep answers plain text; the search variant matches and highlights inside them.
  • Pass stable ids when questions may be reworded, so controlled open state survives edits.
  • Composes animui SearchField and SegmentedControl.
/components/blocks/faq-section/markdown

The full library index for assistants is at /llms.txt.

Related

AccordionComponentProgressively reveal supporting information in place.Search fieldComponentA recognizable search entry point with clear affordances.Contact sectionBlockA validated contact form that morphs into a confirmation, support channels, and office cards with local times.Hero sectionBlockThree full screen SaaS heroes: a live dashboard rising from the bottom edge over a drifting mesh, a workflow graph that routes sample events node by node, and editorial type over a mesh gradient.
PreviousHero sectionNextContact section
animui · 84 block pagesllms.txt

On this page

  • Preview
  • When to use
  • When not to use
  • Installation
  • Usage
  • API reference
  • Keyboard
  • Accessibility
  • Motion
  • Responsive behavior
  • Performance
  • Notes for AI
  • Related
View as Markdown

Frequently asked questions

Everything you need to know before you install your first component.

  • animui is a library of React components and blocks built on Motion and Radix. You copy the source into your project, so every line is yours to change.