Are you an LLM? You can read better optimized documentation at /api/css/side-nav-bar.md for this page in Markdown format
CSS: side-nav-bar
.instui-side-nav-bar — A vertical navigation rail of icon-over-label items, with a minimized icons-only mode.
Source: side-nav-bar.css
Accessibility
Label the <nav> with aria-label so it's announced as a named navigation landmark.
Usage
css
@import "@pantoken/components/components.css";
@import "@pantoken/components/side-nav-bar.css";Examples
html
<nav class="instui-side-nav-bar" aria-label="Primary">
<a class="item -selected" href="#">
<span class="instui-icon -icon-house"></span>
<span class="label">Home</span>
</a>
<a class="item" href="#">
<span class="instui-icon -icon-inbox"></span>
<span class="label">Inbox</span>
</a>
<a class="item" href="#">
<span class="instui-icon -icon-calendar"></span>
<span class="label">Calendar</span>
</a>
<a class="item" href="#">
<span class="instui-icon -icon-settings"></span>
<span class="label">Settings</span>
</a>
</nav>Structure
text
.instui-side-nav-bar
.item
[class*="-icon-"] (0..1)
.labelflowchart TD
n0[".instui-side-nav-bar"]:::cssdoc-root
n1(".item"):::cssdoc-part
n2("[class*="-icon-"]"):::cssdoc-part
n3(".label"):::cssdoc-part
n1 -.->|0..1| n2
n1 --> n3
n0 --> n1
classDef cssdoc-root stroke-width:1px;
classDef cssdoc-part stroke-width:1px;
classDef cssdoc-slot stroke-width:1px;
classDef cssdoc-component stroke-width:1px;
Modifiers
| Modifier | Description |
|---|---|
.-icon-* | Render a glyph icon in each nav item. |
.-minimized | Collapse to icons only (labels hidden). |
Parts
| Part | Description |
|---|---|
.item | A navigation entry; -selected marks the active one. |
.label | An item's text label; hidden when the rail is minimized. |
Tokens consumed
| Token | Type | Value |
|---|---|---|
--instui-component-side-nav-bar-background-color | <color> | light-dark(#ffffff, #273540)LightDark |
--instui-component-side-nav-bar-content-gap | <length> | 0.25rem |
--instui-component-side-nav-bar-content-margin | <length> | 0.375rem |
--instui-component-side-nav-bar-font-color | <color> | light-dark(#273540, #ffffff)LightDark |
--instui-component-side-nav-bar-item-background-color | <color> | transparent |
--instui-component-side-nav-bar-item-border-radius | <length> | 0.75rem |
--instui-component-side-nav-bar-item-content-padding | <length> | 0.375rem |
--instui-component-side-nav-bar-item-font-color | <color> | light-dark(#273540, #ffffff)LightDark |
--instui-component-side-nav-bar-item-font-family | [ <font-family-name> | <generic-font-family> ]# | Atkinson Hyperlegible Next, "Helvetica Neue", Helvetica, Arial, sans-serif |
--instui-component-side-nav-bar-item-font-size | <length> | 0.875rem |
--instui-component-side-nav-bar-item-font-weight | <integer> | 400 |
--instui-component-side-nav-bar-item-hover-background-color | <color> | light-dark(#EEF4FD, #273540)LightDark |
--instui-component-side-nav-bar-item-line-height | <percentage> | 150% |
--instui-component-side-nav-bar-item-link-text-decoration | none | underline || overline || line-through || blink | none |
--instui-component-side-nav-bar-item-selected-background-color | <color> | light-dark(#1D354F, #EEF4FD)LightDark |
--instui-component-side-nav-bar-item-selected-font-color | <color> | light-dark(#ffffff, #1C222B)LightDark |
--instui-component-side-nav-bar-minimized-width | <length> | 3.75rem |
--instui-spacing-space2xs | <length> | 0.125rem |