This component no longer exists. It was in abui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-06 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Accordion Multiselect
abui/accordion-multiselectRemovedComponent
An accordion multiselect component with categories and services.
Live preview
live · rendered by the registry
Rendered by abui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://abui.io/r/accordion-multiselect.jsonSource
1"use client"23import * as React from "react"4import * as AccordionPrimitive from "@radix-ui/react-accordion"5import { Check, ChevronDown } from "lucide-react"6import { cn } from "@/lib/utils"7import * as CheckboxPrimitive from "@radix-ui/react-checkbox"89// --- Architecture: Primitives (Unstyled but behaving) ---10// We are using Radix UI Accordion and Checkbox primitives directly.11// This component acts as a "Component" layer in the architecture:12// - Wraps primitives with styling13// - Supports controlled/uncontrolled usage14// - Uses data-attributes for state and slots for targeting1516// --- Context ---17// We use a context to share selection state between the root and items/checkboxes18// This allows for the Compound Component pattern.19interface AccordionMultiselectContextValue {20 selectedValues: string[]21 onSelectionChange: (value: string, checked: boolean) => void22}2324const AccordionMultiselectContext = React.createContext<AccordionMultiselectContextValue | null>(null)2526function useAccordionMultiselect() {27 const context = React.useContext(AccordionMultiselectContext)28 if (!context) {29 throw new Error("AccordionMultiselect subcomponents must be used within AccordionMultiselect")30 }31 return context32}3334// --- Components ---3536// We can't directly extend AccordionPrimitive.Root because it has specific props that might conflict or be typed in a way TS doesn't like for intersection37// Instead, we'll define our props and intersect with the primitive's props, excluding what we override/don't need if necessary38type AccordionRootProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root>3940interface AccordionMultiselectProps41 extends Omit<AccordionRootProps, "type" | "value" | "defaultValue" | "onValueChange"> {42 value?: string[]43 onValueChange?: (value: string[]) => void44 defaultValue?: string[]45}4647function AccordionMultiselect({48 value: controlledValue,49 onValueChange,50 defaultValue = [],51 className,52 children,53 ...props54}: AccordionMultiselectProps) {55 // Controlled/Uncontrolled pattern56 const [internalValue, setInternalValue] = React.useState<string[]>(defaultValue)57 const isControlled = controlledValue !== undefined58 const selectedValues = isControlled ? controlledValue : internalValue5960 const handleSelectionChange = React.useCallback(61 (value: string, checked: boolean) => {62 let newValues: string[]63 if (checked) {64 newValues = [...selectedValues, value]65 } else {66// … truncated
What it pulls in
npm packages
