Stacked headings that each reveal a panel, with height motion you can reverse mid-way and panels that stay searchable while closed.
Install
Add it to your project
Run this in a project set up for shadcn/ui. It writes the files and installs the npm packages.
First time: connect the Infinity UI registry
- Create a personal token on your Tokens page.
- Put it in
.env.localasINFINITYUI_TOKEN. - Add the registry to
components.json:
{
"registries": {
"@infinityui": {
"url": "https://infinityui.io/r/{name}.json",
"headers": {
"Authorization": "Bearer ${INFINITYUI_TOKEN}"
}
}
}
}Using Claude Code, Codex, Cursor, Lovable or v0? See CLI & MCP for a setup prompt.
npm packages it adds
- cn
- @base-ui/react
- @tabler/icons-react
- class-variance-authority
Code
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion"
const items = [
{
value: "what",
question: "What is HextaUI?",
answer:
"A collection of components built on top of shadcn/ui, with careful attention to structure and micro-interactions.",
},
{
value: "install",
question: "How do I install a component?",
answer:
"Copy the source into your project, then edit it like any other file you own.",
},
{
value: "license",
question: "Can I use it in commercial projects?",
answer:
"Yes. Every component is free and open source, for personal and commercial work.",
},
]
export function AccordionDemo() {
return (
<Accordion defaultValue={["what"]} className="w-full max-w-md">
{items.map((item) => (
<AccordionItem key={item.value} value={item.value}>
<AccordionTrigger>{item.question}</AccordionTrigger>
<AccordionContent>{item.answer}</AccordionContent>
</AccordionItem>
))}
</Accordion>
)
}
































