86 Pro components and page blocks

Get Pro

Split Accordion

New

Preview

Customize

One at a time
Gap12px
Radius20px

Installation

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

Usage

import { SplitAccordion } from "@/components/uibrik/split-accordion/split-accordion";​const items = [  { title: "How long is the free trial?", content: "Fourteen days with every feature included. No card needed to start, and nothing is charged unless you choose a plan." },  { title: "Can I change plans later?", content: "Yes, at any time. Upgrades apply straight away; downgrades take effect at the end of the current billing period." },  // …3 more];​<SplitAccordion  items={items}  type="single"  gap={12}  radius={20}  defaultOpen={[]}  // open={[0]}  // onOpenChange={(open) => {}}/>

Props

SplitAccordion
type
Type "single" | "multiple"
"single"
One section open at a time, or any number.
gap
Type number
12
Space an open section pulls away from its neighbours, in px.
radius
Type number
20
Corner radius of the block and each split piece, in px.
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.