Saltar al contenido
El Muestrario

componente · @solu30/ui-kit/navigation

SidebarNavigation

El componente, montado

Cargando el componente del paquete instalado…

Cargando el chunk del paquete instalado…

De dónde se importa

import { SidebarNavigation } from '@solu30/ui-kit/navigation'

Props

15 props declaradas en los tipos de la versión instalada.
PropRequeridaTipoQué hace
groupsopcionalSidebarNavGroup[]Navigation groups containing items (primary API). Provide either `groups` or `items`, not both.
itemsopcionalSidebarNavItem[]Flat items shorthand — automatically wrapped in a single unlabeled group. Provide either `items` or `groups`, not both.
activeItemIdopcionalstringID of the currently active item
collapsedopcionalbooleanWhether the sidebar is collapsed (icons only) — controlled mode
defaultCollapsedopcionalbooleanInitial collapsed state for uncontrolled mode (ignored when `collapsed` is provided)
onCollapsedChangeopcional(collapsed: boolean) => voidCallback when collapsed state changes
headeropcionalReactNode | {Header slot (logo/brand area). Accepts either a ReactNode or a plain object `{ title, subtitle? }` for a default header layout.
titlestring
subtitleopcionalstring
footeropcionalReactNodeFooter slot (user menu area)
onItemClickopcional(item: SidebarNavItem) => voidCallback when a nav item is clicked
classNameopcionalstringAdditional class names
mobileOpenopcionalbooleanWhether the mobile drawer is open
onMobileOpenChangeopcional(open: boolean) => voidCallback when mobile drawer state changes
appearanceopcional"boxed" | "plain"Visual style variant for items. (ADR-079) - "boxed" (default): current behavior — icon in a rounded box bg, padded items. All existing consumers use this implicitly. Zero breaking change. - "plain": compact list style — icon rendered loose (no background box), reduced vertical padding, items tighter together. Active state is subtle (text-primary + very light bg tint). Enables `childGroups` section headers. ADR-003: both variants use only cmpPreset tokens.

Ejemplo del paquete

<SidebarNavigation
groups={[
{
label: 'Main',
items: [
{ id: 'dashboard', label: 'Dashboard', href: '/', icon: HomeIcon },
{ id: 'orders', label: 'Orders', href: '/orders', icon: BoxIcon, badge: 5 },
],
},
]}
activeItemId="dashboard"
header={<Logo />}
footer={<UserMenu />}
/>

Del @example del JSDoc de @solu30/ui-kit, sin editar. Cuatro de los 69 ejemplos del paquete traen pegada la firma cruda del .d.ts —el mismo defecto del extractor que se come las descripciones—, y por eso la caja tiene tope de alto: el ejemplo de verdad suele estar al final.