ResourceMenuItem

A sidebar menu entry generated from a resource.

Installation

pnpm dlx shadcn@latest add @chelone/resource-menu-item

A sidebar menu entry generated from a resource.

Props

PropTypeDefaultDescription
classNamestring—Extra CSS class appended to the underlying menu button.
iconReactNode—Override the icon. Defaults to the resource icon or `<List />`.
labelReactNode—Override the label. Defaults to the pluralised resource label.
namestring—The resource name (matches a `<Resource name>` registered in `<Admin>`). Used to look up the definition, label, icon and list path.
onClick() => void—Click handler invoked after the default navigation (e.g. close drawer).
tooltipPropsRecord<string, unknown>—Extra props spread onto the underlying `<SidebarMenuButton>`.