Components

Accordion Menu (Radix UI)

A flexible accordion menu that supports multi-level navigation and integrates with your router to manage active states based on the current route.

Installation

pnpm dlx shadcn@latest add @toui/accordion-menu

Examples

States

Multi-expand

Multi-level

Router

API Reference

This component is built using Radix UI Accordion primitives. For detailed information please visit the full API reference.

AccordionMenu

This component provides the context for the accordion menu and includes the following custom props:

PropTypeDefault
selectedValue string | string[] | undefined
matchPath (href: string) => booleanfalse
classNames object: AccordionMenuClassNames

Class Names Props - classNames

PropTypeDefault
group string
separator string
item string
sub string
subTrigger string
subContent string
indicator string

AccordionMenuGroup

This component is used to group menu items.

PropTypeDefault
className string

AccordionMenuLabel

This component is used to label menu groups and includes the following custom props:

PropTypeDefault
className string

AccordionMenuSeparator

This component is used to separate menu items and includes the following custom props:

PropTypeDefault
className string

AccordionMenuItem

This component is used to create individual menu items and includes the following custom props:

PropTypeDefault
variant enum default

AccordionMenuIndicator

This component is used to display indicators for menu items and includes the following custom props:

PropTypeDefault
className string

Credits

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking Accept, you agree to our use of cookies.
Learn more.