Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultUI componentsLine FAQ Accordion
Lens Zoom CarouselBrowse all 182Pill to Panel Tabs
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Line FAQ Accordion

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

  • gsap
  • SplitText

Setup

npm i gsapregisterPlugin(SplitText)

More like this

  • Accordion
  • Reveal
  • Stagger
  • Split text

Features.

  • Answers open with an eased height (expo.inOut) from 0 to their natural size
  • The plus turns half a turn into a minus as its vertical stroke fades out
  • The answer's lines rise in one after another through masks, split fresh at the current width every time it opens
  • One open at a time by default; set data-au-single="false" to let several stay open
  • A quick re-click reverses from wherever the animation is, with no jump
  • The question colour moves from muted to full on hover and while open
  • An optional sticky heading beside the list on wide screens, stacked above it under 768px
  • Real <button>s with aria-expanded and aria-controls set by the script
  • Respects prefers-reduced-motion: panels and icons switch instantly, no line rise
  • GSAP and SplitText

How to get it right.

Keep answers short

One line is enough to see the panel open; the line rise shows its stagger from two lines up. Long answers push the rest of the list far down and make the open take longer to settle.

Questions on one line

The question and the plus share a row. Short questions keep the plus in the same place down the list.

Pick one item to start open

Put data-lac-open="true" on the first item so the list shows what it does before anyone clicks. With single on, only the first open item stays open on load.

Match the speed to the content

data-au-duration sets the panel and icon. 0.5s suits a short paragraph; go towards 0.8 for longer answers so the height doesn't snap.

Variations.

  • FAQ — the default: one open at a time, lines rising
  • Several open — data-au-single="false" for a reference list people read side by side
  • Quiet — data-au-lines="false": the panel and icon still animate, the text is simply there
  • With a title: add <h2 class="lac_title"> before .lac_list (or pass title in React): it sticks beside the list
  • Your colours — override --lac-bg, --lac-fg, --lac-muted, --lac-answer, --lac-line and --lac-focus on the section

Where it fits.

  • FAQ sections — on pricing, product or support pages
  • Process steps — each step as a question, its detail as the answer
  • Specs and details — materials, care, shipping on a product page
  • Service lists — what's included, opened one at a time

Frequently asked.

Yes. Leave data-lac-open off every item.

The line rise splits [data-lac-answer] into lines, so keep it to one paragraph of text and inline links. For richer content, put it in the panel outside [data-lac-answer], or remove the attribute; the panel and icon still animate.

Yes. Each question is a <button>, so Tab, Enter and Space work as usual, and the focus ring uses --lac-focus.

Yes. Each [data-au-line-accordion] is its own instance, and single only closes items within the same accordion.

Set font-size on the section. Everything inside is in em.

Related components.

Pro

Image Slide Tabs

Click

Pro

Glow Band Sheet Modal

Click

Pro

Expanding Card Modal

Click