Collapsible
Collapsible on the Radix primitive. Pure logic with data-slot attributes; styling belongs to the content you put inside.
@peduarte starred 3 repositories
@radix-ui/primitives
Installation
bunx --bun shadcn@latest add https://neu.beyondtheinnovation.com/r/neu-collapsible.jsonUsage
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from "@/components/ui/neu/collapsible"<Collapsible>
<CollapsibleTrigger>Can I use this in my project?</CollapsibleTrigger>
<CollapsibleContent>
Yes. Free to use for personal and commercial projects.
</CollapsibleContent>
</Collapsible>Controlled state
Use open and onOpenChange to control the state.
const [open, setOpen] = React.useState(false)
<Collapsible open={open} onOpenChange={setOpen}>
<CollapsibleTrigger>Toggle</CollapsibleTrigger>
<CollapsibleContent>Content</CollapsibleContent>
</Collapsible>Accordion
Neumorphic accordion on the Radix primitive. Flat triggers with a tinted hover, groove borders between items, stock height animation untouched.
Separator
Neumorphic separator on the Radix primitive. An engraved line: a rounded two-stop gradient, dark crease over lit edge, derived from the surface token and thickened by Elevation.