For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
/
144
Sponsor

Accordion

A disclosure whose opened/closed state is a pure function of the timeline.

Is it accessible?
Yes. It adheres to the WAI-ARIA design pattern.
Customize

Installation

$ pnpm dlx shadcn@latest add @framecn/accordion

Usage

import { Accordion } from "@/components/ui/accordion";
<Accordion />

Smooth transitions

The docs preview animates open → close via useAccordionTransition. In your composition, drive the same hook and pass style:

import { Accordion } from "@/components/framecn/accordion";
import { useAccordionTransition } from "@/components/framecn/use-accordion-transition";
 
const style = useAccordionTransition([
  { at: 18, state: "opened", duration: 16 },
  { at: 78, state: "closed", duration: 12 },
]);
 
<Accordion style={style} />;

API Reference

Accordion

PropTypeDefault
state"opened" | "closed""closed"
styleAccordionStyle- (takes precedence over state)
titlestring"Is it accessible?"
contentstringWAI-ARIA default copy
contentHeightnumber64
variant"default" | "ghost""default"
themePartial<FramecnTheme>-