Accordion

Calm shadcn-compatible accordion built on Collapsible (Accordion, AccordionItem, AccordionTrigger, AccordionContent) with type single or multiple, collapsible, controlled or uncontrolled value, a spring-rotating chevron, height-morphing panels and Arrow/Home/End focus movement between triggers; the quiet counterpart to the springy Bouncy Accordion.

Preview

Accordion preview width

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @karaui/accordion
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

AccordionContent

className?
string
—

Accordion

type
"multiple" | "single"
—
value?
string | string[]
—
defaultValue?
string | string[]
—
onValueChange?
((value: string) => void) | ((value: string[]) => void)
—
collapsible?
boolean

Allow closing the open item so none is open. Default false (shadcn/Radix parity).

—
disabled?
boolean
false
className?
string
—

AccordionItem

value
string
—
disabled?
boolean
false
className?
string
—

AccordionTrigger

icon?
ReactNode

Replace the rotating chevron, or pass `null` to hide it.

—
headingLevel?
2 | 3 | 4 | 5 | 6

Heading element wrapping the trigger (WAI-ARIA accordion pattern).

3
className?
string
—

Updated