Components
Accordion
Collapsible sections with rough chevrons and hand-drawn separators.
A hand-drawn React component library built on Rough.js.
Installation
package manager
npx shadcn add https://bydefaulthuman.fun/r/accordion.jsonProps
Accordion
PropTypeDefaultDescription
defaultValuestring | string[]—
Item(s) open by default (uncontrolled).
multiplebooleanfalseAllow multiple items to be open at once.
animateOnHoverbooleantrueRe-sketches the border on mouse enter.
onValueChange(value: string | string[]) => void—
Fires when open items change. Returns array when multiple is true.
theme"pencil" | "ink" | "crayon"—
Overrides the global Crumble theme for this component.
strokestring—
CSS color for the rough stroke.
strokeMutedstring—
CSS color for muted strokes. Defaults to a transparent mix of stroke.
fillstring—
CSS color for the rough fill.
AccordionItem
PropTypeDefaultDescription
value*string—
Unique identifier for this item, passed to AccordionTrigger and AccordionContent.
AccordionTrigger
PropTypeDefaultDescription
value*string—
Must match the parent AccordionItem value.
AccordionContent
PropTypeDefaultDescription
value*string—
Must match the parent AccordionItem value. Content is hidden when this item is closed.
Multiple open
Open by default.
Also open by default.
Accessibility
Accordion keeps triggers as real buttons with aria-expanded, which is the right semantic pattern for disclosure content. Keep each trigger label descriptive enough to stand alone when navigated out of context.
Examples
import {
Accordion,
AccordionItem,
AccordionTrigger,
AccordionContent,
} from "@/components/crumble/ui/accordion";
<Accordion>
<AccordionItem value="a">
<AccordionTrigger value="a">What is crumble?</AccordionTrigger>
<AccordionContent value="a">
A hand-drawn React component library built on Rough.js.
</AccordionContent>
</AccordionItem>
</Accordion>;