Una barra lateral de aplicación plegable con encabezado, grupos, menús, insignias, un riel y un área de contenido insertada: el Sidebar de shadcn/ui para Angular.
Use the toggle (or drag the rail) to collapse the sidebar to icons.
html
<!-- Joined: the sidebar and the page share one surface. Separate: each is an island. --><sone-segmentedsize="sm"ariaLabel="Layout" [options]="layouts" [(value)]="layout" /><divsoneSidebarWrapperstyle="display: flex; height: 360px; margin-top: var(--space-3); overflow: hidden;
border: var(--border-width-thin) solid var(--border-subtle); border-radius: var(--radius-md)"><sone-sidebar [variant]="layout()"collapsible="icon"role="navigation"aria-label="Workspace"><divsoneSidebarHeader><buttonsoneBtnsoneSidebarTriggervariant="ghost"size="icon-sm"type="button"aria-label="Toggle sidebar"><sone-iconicon="sidebar" /></button></div><divsoneSidebarContent><sectionsoneSidebarGrouparia-label="Library"><divsoneSidebarGroupLabel>Library</div><ulsoneSidebarMenu><lisoneSidebarMenuItem><buttonsoneSidebarMenuButtontype="button"tooltip="Search"><sone-iconicon="search" /><span>Search</span></button></li><lisoneSidebarMenuItem><buttonsoneSidebarMenuButtontype="button"isActivetooltip="Meetings"><sone-iconicon="meetings" /><span>Meetings</span></button></li><lisoneSidebarMenuItem><buttonsoneSidebarMenuButtontype="button"tooltip="Notes"><sone-iconicon="notes" /><span>Notes</span></button></li><lisoneSidebarMenuItem><buttonsoneSidebarMenuButtontype="button"tooltip="Reminders"><sone-iconicon="reminders" /><span>Reminders</span></button><spansoneSidebarMenuBadge>3</span></li></ul></section><sectionsoneSidebarGrouparia-label="Developer"><divsoneSidebarGroupLabelvariant="destructive">Developer</div><ulsoneSidebarMenu><lisoneSidebarMenuItem><buttonsoneSidebarMenuButtonvariant="destructive"type="button"isActivetooltip="Logs"><sone-iconicon="code" /><span>Logs</span></button></li></ul></section></div><divsoneSidebarFooter><ulsoneSidebarMenu><lisoneSidebarMenuItem><buttonsoneSidebarMenuButtontype="button"tooltip="Settings"><sone-iconicon="settings" /><span>Settings</span></button></li></ul></div><divsoneSidebarRail></div></sone-sidebar><divsoneSidebarInsetstyle="padding: var(--space-5); color: var(--text-secondary)"><pstyle="margin: 0">Use the toggle (or drag the rail) to collapse the sidebar to icons.</p></div></div>
`sidebar.css` is global, not component-scoped: the app shell must be styled before Angular boots (WKWebView cold-launch FOUC fix, see app-shell). `collapsible` defaults to `"none"`, not spartan's `"offcanvas"`: this same part is also the static section rail in the Settings dialog, which must not collapse whenever the app-wide sidebar does.
Selector
sone-sidebar
Inputs
Nombre
Tipo
Predeterminado
side
SoneSidebarSide
"left"
variant
SoneSidebarVariant
"sidebar"
collapsible
SoneSidebarCollapsible
"none"
SoneSidebarContentDirectiveDirectiva
Selector
[soneSidebarContent], sone-sidebar-content
SoneSidebarFooterDirectiveDirectiva
Selector
[soneSidebarFooter], sone-sidebar-footer
SoneSidebarGroupActionDirectiveDirectiva
Selector
button[soneSidebarGroupAction]
SoneSidebarGroupContentDirectiveDirectiva
Selector
[soneSidebarGroupContent]
SoneSidebarGroupDirectiveDirectiva
Selector
[soneSidebarGroup], sone-sidebar-group
Inputs
Nombre
Tipo
Predeterminado
tone
`danger` tints the group's label and rows red (a developer or destructive section).
SoneSidebarGroupTone
"default"
SoneSidebarGroupLabelDirectiveDirectiva
Selector
[soneSidebarGroupLabel]
Inputs
Nombre
Tipo
Predeterminado
variant
`destructive` sets the label in the danger colour (pair it with `destructive` menu buttons).
$localize`Click to collapse · drag to resize · ⌥-click to reset width`
collapsedHint
—
$localize`Click to expand`
SoneSidebarSeparatorDirectiveDirectiva
Selector
[soneSidebarSeparator], sone-sidebar-separator
SoneSidebarTriggerDirectiveDirectiva
Selector
button[soneSidebarTrigger]
SoneSidebarWrapperDirectiveDirectiva
⌘B/Ctrl+B also toggles Bold in `sone-markdown-editor`, which calls `preventDefault()` on the textarea before this document-level listener runs, so it stands down there and never fires inside any editable field.