Bouncy Accordion
Stacked accordion that springs open with a gap and rounded card.
Import
tsx
import { BouncyAccordion } from "@cronus-ui/ui";
bash
npx cronus-ui add bouncy-accordion
Examples
.cronus
The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.
default.cronus
app "audit-fixtures" {
port 5176
}
style {
preset aurora
theme dark
}
component BouncyAccordionDefault layout:inline style:bouncy-accordion {
label "default"
text "Type"
text "Schedule"
}
page "/audit/bouncy-accordion/default" type:custom {
use BouncyAccordionDefault
}
API Reference
Generated from the component's exported types.
BouncyAccordionLabels
| Prop | Type | Default | Description |
|---|---|---|---|
hint* | string | — | Hint drawn above the stack. |
BouncyAccordionProps
Extends Omit< ComponentPropsWithoutRef<"div">, "defaultValue" | "onAnimationStart" | "onAnimationEnd" | "onDrag" | "onDragStart" | "onDragEnd" >
| Prop | Type | Default | Description |
|---|---|---|---|
ref | Ref<HTMLDivElement> | — | Ref forwarded to the underlying DOM node. |
items* | BouncyAccordionItem[] | — | — |
value | string | null | — | Controlled open item. `null` collapses all. |
defaultValue | string | null | null | Uncontrolled initial value. |
onValueChange | (id: string | null) => void | — | Called when the value changes. |
labels | Partial<BouncyAccordionLabels> | — | Override default English strings. |
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |