Components › Navigation › App shell › Sidebar nav item

Sidebar nav item

canon

Row of the left navigation: top-level row, section divider and sub-item, plus the split parent that navigates and folds.

React implementation lives in the app (apps/web/src/components/AppShell.tsx — WorkspaceNav/NavGo), not in @acrm/ui. The dead rules .as-row .notif/.count were removed on 11 September 2026 (NAV-1, acrm !3403); counts are .acrm-pill. Debt: no standalone segment-tile component — `.sg` (the 18px coloured tile with the list's glyph) exists only as `.as-sub .sg` in `apps/web/src/ds/app-shell.css`. `AddToListDialog` (acrm !4019, 27 Sep 2026, see the "add-to-list dialog" subsection of formless-dialog.usage.md) reuses it by extending the same selector rather than duplicating the rule — `.as-sub .sg, .atl-list .sg { … }` — one definition serving both the left menu and the dialog's list rows; accepted by the AD 27 Sep 2026 as a stopgap. Target: extract a canonical `SegmentTile` so a third consumer does not repeat the same selector-extension trick. 30 Sep 2026 (acrm !4296, AD FA216/FA233): optional dot?: blue | amber | green | purple | rose | critical draws the canonical category dot .il-dot[data-tone] (6 px, gap --sp-1) before the PLAIN count, no capsule. Category meaning only (Komunikace: Důležité critical, Delegováno mnou purple — owner R15, Delegováno mně amber); never unread (unread = blue dot elsewhere). acrm !4319 (1. 10. 2026, ověřeno na devu 1440/390 světlá+tmavá): tichý počet .as-navcnt místo modré kapsle, kapsle jen kritický odznak, horní blok 6, ⋯ akce seznamů (MenuButton) a + u Seznamů. Komunikace menu (20 Oct 2026, owner "1 Schváleno", proto/komunikace-menu-zobrazit-vse@0b7180f3a, ACRM-558, 560–569): rarely used Mail views (Newsletters, Sent, Archive, Trash, Snoozed, Drafts, Scheduled) live in a collapsible section "Další" (`.as-grp.as-more`, heading styled like "Chaty", collapsed by default, hidden-unread count on the right while collapsed); the active hidden view is shown as a copy above it; rows drag (HTML5 DnD) within and between groups and move with Alt+↑/↓ (aria-live announces the new place); personal preference in localStorage. No ⋮ menu on views. Row marks: `sgDot` = colour dot in the label colour (`.as-sub .sg.dot`, labels), `sgPlain` = bare muted glyph ("+ New label/folder/deal" rows), `sgTint` = bare glyph in the channel colour (chats: Telegram --ic-blue, WhatsApp --ic-green, SMS new token --ic-mint #34c759; the Chaty section is collapsible and open by default); a folder tile takes its own icon and tone (fallback grey `folder`). Tokens: new `--ic-mint`. Module icon Komunikace = `message-chatbot`, "All chats" = `message-circle`. AD 24 Oct 2026 (a2a FA278, acrm !5560): menu axis UX-62 accepted — .as-row-chev / .as-sub-chev / .as-sub-more share one axis (the sub-menu ⋯ sits exactly on the count, count hides on hover/open); .as-shared = sharing badge with ONE meaning only: the subject is shared with other users (who + level reachable on touch via ⋮/detail, not hover-only). Amber capsule (badgeAmber) NOT approved: the only coloured capsule in the menu stays critical; other counts are quiet. Pending from the author: stories States „sdílený“ + „osa“ with light/dark baseline, 390 check.

Used in 5 files · 4 areas · 22× — components/AppShell, components/NavItemMenu, components/segment, pages/settings

Default

components--sidebar-nav-item--defaultOpen standalone ↗Code

Variants

section divider — click the label to fold the block under it (.as-grp)
split parent row — the body navigates, the chevron folds; two sibling controls, both reachable by keyboard
sub-items and their indents — a saved segment (colour tile) and the segment wizard (wand)
components--sidebar-nav-item--variantsOpen standalone ↗Code

States

rest and active — the active row is the one the screen was opened from, not the raw URL (P230); it carries aria-current=„page“
with a count — top-level rows use the blue pill, sub-items the amber one (pending additions in a saved segment)
rail — icon-only sidebar (≥901px); labels, groups and sub-items are hidden, the name survives as title/aria-label
long navigation — the nav scrolls inside the sidebar, the footer with the rail toggle stays put
components--sidebar-nav-item--statesOpen standalone ↗Code

With icon & kbd

every row carries an icon — in the rail it is the only thing left, so a row without one is not allowed
Nav rows carry no keyboard shortcut chips — the only shortcut in the shell is ⌘K for global search, and it lives in the top bar.
components--sidebar-nav-item--with-icon-and-kbdOpen standalone ↗Code

Composition

Obsah stránky — the rail toggle at the bottom switches the whole sidebar to icons and back.
components--sidebar-nav-item--compositionOpen standalone ↗Code