Measured entry
ruixen-faq-scroll-accordion
faqunclassifiedmotion on file
A shadcn registry client component for an FAQ that opens entries as they reach the center of its own scroll area. It uses React state, a container-scoped IntersectionObserver, Tailwind theme classes, CSS transitions, an inline SVG chevron, and the shadcn cn utility. It declares no package dependencies.



Measured
Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.
| Build | OK |
|---|---|
| Mount | OK |
| Console errors | 0 |
| Uncaught page errors | 0 |
| Horizontal overflow | clean at 375, 768, 1440 |
| Axe critical | 0 |
| Axe serious | 1 |
| Axe moderate | 0 |
| Axe minor | 0 |
| Gzip marginal | 27.9 KB (93.3 KB build, 65.4 KB baseline) |
| Bare mode | FAIL |
| Provider required | NO |
| Demo used | written from the component source API |
What the harness recorded
BARE BUILD
✗ Build failed in 28.86s error during build: [vite:load-fallback] Could not load <sandbox>/src/lib/utils (imported by src/cut/faq-scroll-accordion.tsx): ENOENT: no such file or directory, open '<sandbox>/src/lib/utils'
Verdict
A distinctive fit for short, curated FAQs where the internal scroll behavior is intentional. It mounts cleanly in the prepared harness, but the muted text needs contrast work. A bare project cannot mount it as shipped because it needs a shadcn-style setup, especially the aliased cn utility and theme classes.
Use it if
- You want a compact FAQ whose active answer follows scrolling inside the component.
- Your React app already has Tailwind theme tokens and a shadcn-compatible cn helper.
- You want animation implemented with browser APIs and CSS rather than an animation package.
Skip it if
- Your design cannot tolerate an internally scrolling FAQ with a hidden scrollbar.
- You need the shipped colors to pass contrast checks without adjustment.
- You require complete accordion disclosure attributes such as aria-expanded and aria-controls out of the box.
- You prefer user-controlled expansion without scroll position automatically changing the open answer.
Install
| Declared dependencies | none declared |
|---|---|
| Missing on install | none |
| Bare install | fails once the shadcn-style helpers are removed, so it needs that setup |
| Provider | no provider required in the harness |
In a non-shadcn project, add Tailwind with the foreground, muted-foreground, and border theme classes used here, provide a cn class-merging helper, and either configure the at-sign source alias or replace that import with a local path. Keep it as a client component and ensure IntersectionObserver is available in supported browsers.
Source and credit
This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.
Author repository
github.com/ruixenui/ruixen.comAlternatives
Other published entries for the faq pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.
- hyperui-faq-1editorial
- Renders
- YES
- A11y
- 0
- Gzip
- 17.6KB
- Bare
- pass
- Prov
- NO
- hyperui-faq-2editorial
- Renders
- YES
- A11y
- 0
- Gzip
- 17.6KB
- Bare
- pass
- Prov
- NO
- hyperui-faq-3editorial
- Renders
- YES
- A11y
- 0
- Gzip
- 17.7KB
- Bare
- pass
- Prov
- NO
- meraki-faq-collapseminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 17.9KB
- Bare
- pass
- Prov
- NO
- meraki-faq-centeredminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 18.0KB
- Bare
- pass
- Prov
- NO
- meraki-faq-gridminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 18.0KB
- Bare
- pass
- Prov
- NO