Skip to content
Skills Library
Design & UX · Planning

sidebar-behavior

/sidebar-behavior

Specifies how an admin dashboard sidebar behaves - item order, groups, sub-items, labels, icons, active state, collapse to an icon rail, single sidebar versus a category rail with a section menu, behaviour at 1440, 1024, 768 and 390 px, scope switcher slot, badges, personalisation and extension slots for installed apps - and writes a sidebar spec with rule IDs, plus React (shadcn/ui Sidebar) or SwiftUI (NavigationSplitView) notes. Use when building or reviewing a dashboard sidebar or left navigation, when the menu feels cluttered or users get lost, when adding a mobile drawer, collapse toggle,

Repository
anydash ↗
Licence
MIT
Last repository change
10.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
7
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 10.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Specifies how an admin dashboard sidebar behaves - item order, groups, sub-items, labels, icons, active state, collapse to an icon rail, single sidebar versus a category rail with a section menu, behaviour at 1440, 1024, 768 and 390 px, scope switcher slot, badges, personalisation and extension slots for installed apps - and writes a sidebar spec with rule IDs, plus React (shadcn/ui Sidebar) or SwiftUI (NavigationSplitView) notes. Use when building or reviewing a dashboard sidebar or left navigation, when the menu feels cluttered or users get lost, when adding a mobile drawer, collapse toggle,

Original author description

Specifies how an admin dashboard sidebar behaves - item order, groups, sub-items, labels, icons, active state, collapse to an icon rail, single sidebar versus a category rail with a section menu, behaviour at 1440, 1024, 768 and 390 px, scope switcher slot, badges, personalisation and extension slots for installed apps - and writes a sidebar spec with rule IDs, plus React (shadcn/ui Sidebar) or SwiftUI (NavigationSplitView) notes. Use when building or reviewing a dashboard sidebar or left navigation, when the menu feels cluttered or users get lost, when adding a mobile drawer, collapse toggle,

How it works

  1. Input
  2. Output
  3. Procedure
  4. Rules applied
  5. Example
  6. Self-check
Original SKILL.md headings · 114 lines, 1,671 words
SKILL.md preview
---
name: sidebar-behavior
description: Specifies how an admin dashboard sidebar behaves - item order, groups, sub-items, labels, icons, active state, collapse to an icon rail, single sidebar versus a category rail with a section menu, behaviour at 1440, 1024, 768 and 390 px, scope switcher slot, badges, personalisation and extension slots for installed apps - and writes a sidebar spec with rule IDs, plus React (shadcn/ui Sidebar) or SwiftUI (NavigationSplitView) notes. Use when building or reviewing a dashboard sidebar or left navigation, when the menu feels cluttered or users get lost, when adding a mobile drawer, collapse toggle, badge counts, nested items or an "Apps" group, or when /dash:build reaches the IA step after nav-placement. Do not use it to decide which functions belong in the sidebar at all (use nav-placement first), for the top bar, search, profile or help menu (use global-chrome), or for settings sub-navigation content (use settings-architecture).
---

# Sidebar behavior

Turns the sidebar rows of a placement table into a concrete sidebar: order, grouping, labels, states and responsive behaviour. It does not decide what goes in the sidebar; nav-placement does that.

## Input

- The placement table from nav-placement (or `dash-spec/ia.md`): every row whose home is Sidebar, Sub-nav or Settings entry, with frequency.
- Product facts: number of scopes per user (accounts, stores, workspaces), nested child scopes, installable apps or extensions, work queues with pending counts.
- Stack: React (default) or SwiftUI.

## Output

When run from /dash:build: the sidebar section of `dash-spec/ia.md`. When asked directly: answer inline.

1. Item table: `Order | Label | Icon | Group | Sub-items | Badge | Rule IDs`.
2. Behaviour table: `Width | Sidebar form | Toggle | Rule IDs` for 1440, 1024, 768 and 390 px.
3. A short list of states: active, collapsed, child scope, extension group, personalisation.

For code, follow `references/react.md` or `references/swiftui.md`.

## Procedure

1. Order the top-level items. Home or the main work queue first, then work areas by daily frequency, then a separator and the bottom block: Settings, then account items (NAV-001, SET-005). Keep billing, users and API keys out of the work list (SET-009).
2. Label each item with a short noun in sentence case that matches the target page H1 (NAV-002). No verbs ("Create shipment" is a button, not a destination).
3. Decide structure: single sidebar or category rail plus section menu.
   - About ten or fewer destinations with few sub-pages: one flat sidebar (NAV-005, low, a suggestion).
   - More than ten destinations, mostly one page each: one sidebar with labeled groups; sub-items only inside a disclosure under their parent (NAV-005). Nest deeper only for products with dozens of services; then label every group and keep a search over all pages (NAV-005 exception).
   - About ten or more top-level categories and most of them hold three or more pages: two levels, a 48 px icon rail of categories plus an always visible section menu (240 to 260 px) of the current category's pages under group labels (NAV-013, medium). Categories with a single page show no section menu.
4. Two-level layout only (skip for a single sidebar):
   - Rail: hovering or focusing it expands the labels over the content, never pushing the page; tooltips show the item's shortcut; each user picks open, icons only or open on hover, stored per user (NAV-014, low, a suggestion). Touch devices get the expanded mode or the drawer.
   - Second column: same width and x position in every category; its content fits the category's job, a grouped page menu for configuration, a searchable object list for editors, filters for logs and analytics (NAV-015, low, a suggestion).
   - Active state: the rail marks the category, the section menu marks the page; both carry it (NAV-004).
5. Give every top-level item an icon from one set (NAV-003). Bottom-block utility links may be text-only while expanded, but need an icon if they stay in the rail.
6. Define the active state. Filled highlight on the item plus `aria-current="page"`; parent stays expanded when the active page is a sub-item; detail pages highlight their object's list item (NAV-004).
7. Define collapse. A toggle named "Collapse navigation" / "Expand navigation" with `aria-expanded`; the rail keeps every item's icon, with the label as tooltip and accessible name (NAV-003).
8. Set the breakpoints:
   - 1440 px: expanded sidebar, user can collapse to the rail (NAV-003).
   - 1024 px: expanded by default, collapsible (NAV-003).
   - 768 px: icon rail is acceptable (NAV-006 applies_when); badges stay visible (NAV-011).
   - 390 px: no sidebar; one "Menu" button opens a drawer with focus trap, Escape to close, focus back to the button; content gets the full width (NAV-006, LAY-008). Settings, scope switcher and badges stay reachable in the drawer (SET-005, NAV-011; CHR-012, low).
   - Two-level layout below 768 px: both columns move into the drawer, which opens on the current category's pages with a back control to all categories; on the home page it opens on the category list (NAV-016, low, a suggestion).
9. Place the scope switcher. If a user can belong to more than one account, store or workspace, the current scope name sits in the sidebar header as a button that opens a searchable list with a create action (CHR-007). Single scope: show the name in the user menu instead. Nested child scope with many feature pages: swap the sidebar for the child's menu, headed by the child name and a back link to the parent list (NAV-009, low).
10. Add badges. Numbers only for actionable queues, with an accessible name that says what is counted ("Orders, 3 to fulfil"); text pills for New or Beta; counts never hidden at narrow widths (NAV-011).
11. Add the extension slot when apps or plugins can add pages. A labeled, collapsible "Apps" group below the core items; an open app shows its sub-items under its own entry, its Settings last (SET-003); suggestion: users can pin and unpin (NAV-010, low). Data-only integrations add no item (INT-011).
12. Add personalisation only when one role uses a fraction of the menu. Pin, hide or recents, stored per user, not per browser; Home and Settings cannot be hidden or moved (NAV-012).
13. When settings span several pages, entering Settings shows its own navigation with a labeled back link to the main menu, and each page has its own URL (SET-004).

## Rules applied

- NAV-001 — Work areas first by frequency, account items last and separated.
- NAV-002 — Noun labels in sentence case, matching the page H1.
- NAV-003 — Icons on every top-level item, collapsible icon rail with tooltips.
- NAV-004 — Filled active state, aria-current, parent expanded.
- NAV-005 — Flat up to about ten items, groups above that (low).
- NAV-006 — Drawer below about 768 px; rail acceptable from 768 to 1024 px (medium).
- NAV-009 — Child scope swaps the sidebar, with a back link (low).
- NAV-010 — Extensions in a labeled collapsible group with pin and unpin (low).
- NAV-011 — Numeric badges only for work queues, visible at every width (medium).
- NAV-012 — Per-user pin, hide and recents; Home and Settings fixed (medium).
- NAV-013 — Category rail plus persistent section menu for many multi-page categories (medium).
- NAV-014 — Rail expands over the content on hover and focus; per-user sidebar mode (low).
- NAV-015 — Second column keeps one width and fits the category's job (low).
- NAV-016 — Phone drawer opens at the current category (low).
- SET-004 — Settings has its own navigation, back link and URLs.
- SET-005 — Settings entry fixed at the sidebar bottom.
- SET-009 — Account administration stays out of the work list.
- CHR-007 — Scope switcher in the sidebar header, searchable (medium).
- CHR-012 — Nothing dropped at narrow widths; names kept (low).
- LAY-008 — Content owns the phone width.

## Example

Good, single sidebar: shipping admin, one account per user, 8 destinations.

| Order | Label | Icon | Group | Badge | Rule IDs |
|---|---|---|---|---|---|
| 1 | Home | house | - | - | NAV-001 |
| 2 | Orders | inbox | - | "12" = 12 to ship | NAV-001, NAV-011 |
| 3 | Shipments | truck | - | - | NAV-002 |
| 4 | Pickups | calendar | - | - | NAV-002 |
| 5 | Returns | rotate | - | "Beta" pill | NAV-011 |
| 6 | Reports | chart | - | - | NAV-001 |
| - | separator | | | | NAV-001 |
| 7 | Settings | gear | bottom block | - | SET-005 |

At 390 px a "Menu" button opens a drawer that still shows the "12" badge and Settings (NAV-006, NAV-011).

Good, two-level: 12 categories, most with 3 to 15 pages.

| Column | Content | Rule IDs |
|---|---|---|
| Rail, 48 px | Home, Records, Queries, Data, Users, Files, Jobs, Logs, Reports, then separator, Settings | NAV-001, NAV-013, SET-005 |
| Rail on hover | Expands to about 200 px over the page; the tooltip shows the label and its keyboard shortcut; a menu at the bottom sets the mode: open, icons only or open on hover | NAV-014 |
| Section menu, 256 px, Data | "Content": Collections, Fields, Views; "Access": Roles, Permissions; "Configuration": Settings | NAV-013, NAV-015 |
| Section menu, 256 px, Records | Search field, folder picker, list of record types | NAV-015 |
| Section menu, Home | None; content takes the full width | NAV-013 exception |

At 390 px on a Data page, "Menu" opens a drawer headed "< Data" with its grouped pages; the back control shows all categories (NAV-016).

Bad: "Create shipment" and "API keys" as items 2 and 3 (NAV-002, SET-009); groups and a three-level tree for 8 items (NAV-005); at 768 px the badge is hidden by a CSS rule (NAV-011); the collapsed rail shows unlabeled icons with no tooltip (NAV-003).

## Self-check

- [ ] First item is Home or the main work queue; Settings and account items are last, after a separator.
- [ ] Every label is a sentence-case noun that matches its page H1.
- [ ] Exactly one item has `aria-current="page"` on list, detail and sub-item pages.
- [ ] Collapse toggle has `aria-expanded`; every rail icon has an accessible name and tooltip.
- [ ] At 390 px the sidebar is a drawer, no horizontal scroll, badges and Settings still reachable.
- [ ] Numeric badges count only actionable items and say what they count.
- [ ] Scope switcher present only when users have more than one scope.
- [ ] Two-level layout only when there are about ten or more categories, most with three or more pages (NAV-013); the content's left edge does not move when the rail expands on hover (NAV-014).
- [ ] Low-confidence rules (NAV-005, NAV-009, NAV-010, NAV-014, NAV-015, NAV-016, CHR-012) are labelled as suggestions.
Files in this package (7)
  • SKILL.md 10 KB
  • references/areas.txt 1 KB
  • references/frameworks.txt 1 KB
  • references/react.md 8 KB
  • references/rules.md 39 KB
  • references/swiftui.md 6 KB
  • references/frameworks/placement-decision-tree.md 5 KB

Versions

The database has no other skills named sidebar-behavior.

Database snapshot: 13.11.2026 · package version 8bc298576cae (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100nav-placement
    Decides where every function of an admin dashboard lives - main sidebar, sub-area sub-nav, settings, the object's own page, top bar or persistent chrome, command palette, or setup checklist - and produces a placement table (function | home | rule IDs). Use when designing or…
  • 85sidebar-generator
    When the user wants to design, optimize, or audit a sidebar for blogs, docs, or content pages. Also use when the user mentions "sidebar," "blog sidebar," "content sidebar," "side panel," "sidebar navigation," "related content," "sidebar CTA," "doc sidebar," or "sidebar widgets."…
  • 100apple-hig-sidebars
    Use when designing, reviewing, or implementing a sidebar for an Apple-platform app — top-level navigation only, grouped sections, NavigationSplitView, consistent SF Symbols, and safe compact-width behavior.
  • 100global-chrome
    Decides the persistent chrome of an admin dashboard - top bar and sidebar header/footer slots for global search and the Cmd/Ctrl+K palette, notifications bell versus toasts, help and support entry, AI assistant entry, user/profile menu with logout, account or store switcher,…
  • 100dashboard-ui
    Use when building, styling, or reviewing any screen, component, or layout of the Anchor web dashboard (React, Tailwind, shadcn/ui) — pages, tables, forms, dialogs, sheets, sidebar, header, empty/loading states, badges, or when the request mentions "clean", "compact",…
  • 100navigation-and-flows
    Use when choosing or reviewing app navigation (tab bar, bottom navigation, hamburger menu, sidebar, rail), structuring information architecture, designing sheets, modals and dialogs flows, back behaviour, search, gestures or a multi-step flow such as checkout or sign-up. Do not…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.