43 Pro components and page blocks

Get Pro

Accordion

New

Preview

Customize

One at a time
Divided
Chevron

Usage

import { Accordion } from "@/components/uibrik/accordion/accordion";

<Accordion items={items} />

Installation

npx shadcn@latest add https://uibrik.com/r/accordion.json
Adds the files to components/uibrik/accordion and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/accordion.

Props

Accordion
type
Type "single" | "multiple"
"single"
How many sections can be open at once.
variant
Type "divided" | "separated"
"divided"
Hairlines between sections, or each section as its own card.
icon
Type "chevron" | "plus"
"chevron"
Chevron that turns, or plus that becomes minus.
itemsrequired
Type { title: ReactNode; content: ReactNode }[]
–
The sections.
defaultOpen
Type number[]
–
Indexes open at first.
open / onOpenChange
Type number[] / (open) => void
–
Open indexes, controlled.
className
Type string
–
Classes for the list.