🎉 Sora UI is now part of the shadcn/ui registry ecosystem.
Sora UI

Accordion

An animated FAQ accordion with expandable panels.

Made by Axyl
Loading...

Installation

Usage

import { Accordion } from '@/components/sora-ui/disclosure/accordion';

const items = [
  {
    title: 'What is Sora UI?',
    content:
      'Sora UI is an animated component registry for React and Next.js, built on Motion.',
    defaultOpen: true,
  },
  {
    title: 'How do I install a component?',
    content: 'Run npx shadcn@latest add @soralabs/accordion after initializing shadcn/ui.',
  },
];

export default function Page() {
  return <Accordion items={items} />;
}

For custom content per item, pass a React node as content or compose with the compound API:

import {
  Accordion,
  AccordionContent,
  AccordionItem,
  AccordionTrigger,
} from '@/components/sora-ui/disclosure/accordion';

export default function Page() {
  return (
    <Accordion>
      <AccordionItem defaultOpen>
        <AccordionTrigger>Custom layout</AccordionTrigger>
        <AccordionContent>
          <div className="pb-5 text-sm">Your own markup here.</div>
        </AccordionContent>
      </AccordionItem>
    </Accordion>
  );
}

Props

Accordion

PropTypeDefault
allowMultiple?
boolean
false
duration?
number
0.8
iconMode?
"rotate" | "fade" | "both"
"both"
iconRotation?
number
-180
ease?
[number, number, number, number]
expo.inOut
disabledOn?
("mobile" | "tablet" | "desktop")[]
-
items?
{ id?: string; title: string; content: React.ReactNode; defaultOpen?: boolean }[]
-
className?
string
-

AccordionItem

PropTypeDefault
defaultOpen?
boolean
false
delay?
number
0
duration?
number
-
ease?
[number, number, number, number]
-
iconRotation?
number
-
disabledOn?
("mobile" | "tablet" | "desktop")[]
-
onOpen?
() => void
-
onClose?
() => void
-

Credits

Inspired by Annnimate. Reimplemented for Motion and React.

Built by Axyl. The source code will be available on GitHub soon.

Last updated: 6/9/2026