J3W1 / DESIGN SYSTEM
Sidebar navigation
A vertical list of section links with optional nested groups; the current section carries a 2px inline-start indicator and bright text, and the rail collapses to icons.
stable · LIGHT DOM · 1.1.0
Light DOM retains static content, native semantics, label relationships and host composition without duplicating controls.
Live variants
default
<j3w1-sidebar-nav id="example-sidebar-nav-default"><nav class="sidebar-nav" aria-label="Sections">
<ul class="sidebar-nav-list">
<li class="sidebar-nav-item"><a class="sidebar-nav-link sidebar-nav-current" href="#example-sidebar-nav-default-sn-overview" aria-current="page"><span class="sidebar-nav-icon" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><rect x="2.5" y="2.5" width="11" height="11"></rect></svg></span><span class="sidebar-nav-label">Overview</span></a></li>
<li class="sidebar-nav-item"><a class="sidebar-nav-link sidebar-nav-link-demo-target" href="#example-sidebar-nav-default-sn-tokens"><span class="sidebar-nav-icon" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><circle cx="8" cy="8" r="5.5"></circle></svg></span><span class="sidebar-nav-label">Tokens</span></a></li>
<li class="sidebar-nav-item">
<button class="sidebar-nav-link sidebar-nav-group" type="button" aria-expanded="false" aria-controls="example-sidebar-nav-default-sn-components"><span class="sidebar-nav-icon" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><path d="M2.5 4h11M2.5 8h11M2.5 12h11"></path></svg></span><span class="sidebar-nav-label">Components</span><span class="sidebar-nav-chevron" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><path d="M6 4l4 4-4 4"></path></svg></span></button>
<ul class="sidebar-nav-list sidebar-nav-sublist" id="example-sidebar-nav-default-sn-components" hidden="">
<li class="sidebar-nav-item"><a class="sidebar-nav-link" href="#example-sidebar-nav-default-sn-actions"><span class="sidebar-nav-label">Actions</span></a></li>
<li class="sidebar-nav-item"><a class="sidebar-nav-link" href="#example-sidebar-nav-default-sn-forms"><span class="sidebar-nav-label">Forms</span></a></li>
</ul>
</li>
<li class="sidebar-nav-item"><a class="sidebar-nav-link" href="#example-sidebar-nav-default-sn-ports"><span class="sidebar-nav-icon" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><path d="M3 8h10M9 4l4 4-4 4"></path></svg></span><span class="sidebar-nav-label">Ports</span></a></li>
</ul>
</nav><p id="example-sidebar-nav-default-sn-overview" tabindex="-1" class="j3w1-example-target">Example destination: sn overview</p><p id="example-sidebar-nav-default-sn-tokens" tabindex="-1" class="j3w1-example-target">Example destination: sn tokens</p><p id="example-sidebar-nav-default-sn-actions" tabindex="-1" class="j3w1-example-target">Example destination: sn actions</p><p id="example-sidebar-nav-default-sn-forms" tabindex="-1" class="j3w1-example-target">Example destination: sn forms</p><p id="example-sidebar-nav-default-sn-ports" tabindex="-1" class="j3w1-example-target">Example destination: sn ports</p></j3w1-sidebar-nav>collapsed
<j3w1-sidebar-nav id="example-sidebar-nav-collapsed"><nav class="sidebar-nav sidebar-nav-collapsed" aria-label="Sections">
<ul class="sidebar-nav-list">
<li class="sidebar-nav-item"><a class="sidebar-nav-link sidebar-nav-current" href="#example-sidebar-nav-collapsed-sn-overview" aria-current="page" aria-label="Overview" title="Overview"><span class="sidebar-nav-icon" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><rect x="2.5" y="2.5" width="11" height="11"></rect></svg></span><span class="sidebar-nav-label">Overview</span></a></li>
<li class="sidebar-nav-item"><a class="sidebar-nav-link sidebar-nav-link-demo-target" href="#example-sidebar-nav-collapsed-sn-tokens" aria-label="Tokens" title="Tokens"><span class="sidebar-nav-icon" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><circle cx="8" cy="8" r="5.5"></circle></svg></span><span class="sidebar-nav-label">Tokens</span></a></li>
<li class="sidebar-nav-item">
<button class="sidebar-nav-link sidebar-nav-group" type="button" aria-expanded="false" aria-controls="example-sidebar-nav-collapsed-sn-components" aria-label="Components" title="Components"><span class="sidebar-nav-icon" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><path d="M2.5 4h11M2.5 8h11M2.5 12h11"></path></svg></span><span class="sidebar-nav-label">Components</span><span class="sidebar-nav-chevron" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><path d="M6 4l4 4-4 4"></path></svg></span></button>
<ul class="sidebar-nav-list sidebar-nav-sublist" id="example-sidebar-nav-collapsed-sn-components" hidden="">
<li class="sidebar-nav-item"><a class="sidebar-nav-link" href="#example-sidebar-nav-collapsed-sn-actions" aria-label="Actions" title="Actions"><span class="sidebar-nav-icon" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><rect x="3" y="5" width="10" height="6"></rect></svg></span><span class="sidebar-nav-label">Actions</span></a></li>
<li class="sidebar-nav-item"><a class="sidebar-nav-link" href="#example-sidebar-nav-collapsed-sn-forms" aria-label="Forms" title="Forms"><span class="sidebar-nav-icon" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><path d="M3 5h10M3 8h6M3 11h8"></path></svg></span><span class="sidebar-nav-label">Forms</span></a></li>
</ul>
</li>
<li class="sidebar-nav-item"><a class="sidebar-nav-link" href="#example-sidebar-nav-collapsed-sn-ports" aria-label="Ports" title="Ports"><span class="sidebar-nav-icon" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><path d="M3 8h10M9 4l4 4-4 4"></path></svg></span><span class="sidebar-nav-label">Ports</span></a></li>
</ul>
</nav><p id="example-sidebar-nav-collapsed-sn-overview" tabindex="-1" class="j3w1-example-target">Example destination: sn overview</p><p id="example-sidebar-nav-collapsed-sn-tokens" tabindex="-1" class="j3w1-example-target">Example destination: sn tokens</p><p id="example-sidebar-nav-collapsed-sn-actions" tabindex="-1" class="j3w1-example-target">Example destination: sn actions</p><p id="example-sidebar-nav-collapsed-sn-forms" tabindex="-1" class="j3w1-example-target">Example destination: sn forms</p><p id="example-sidebar-nav-collapsed-sn-ports" tabindex="-1" class="j3w1-example-target">Example destination: sn ports</p></j3w1-sidebar-nav>nested
<j3w1-sidebar-nav id="example-sidebar-nav-nested"><nav class="sidebar-nav" aria-label="Sections">
<ul class="sidebar-nav-list">
<li class="sidebar-nav-item"><a class="sidebar-nav-link" href="#example-sidebar-nav-nested-sn-overview"><span class="sidebar-nav-icon" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><rect x="2.5" y="2.5" width="11" height="11"></rect></svg></span><span class="sidebar-nav-label">Overview</span></a></li>
<li class="sidebar-nav-item">
<button class="sidebar-nav-link sidebar-nav-group" type="button" aria-expanded="true" aria-controls="example-sidebar-nav-nested-sn-components"><span class="sidebar-nav-icon" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><path d="M2.5 4h11M2.5 8h11M2.5 12h11"></path></svg></span><span class="sidebar-nav-label">Components</span><span class="sidebar-nav-chevron" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><path d="M6 4l4 4-4 4"></path></svg></span></button>
<ul class="sidebar-nav-list sidebar-nav-sublist" id="example-sidebar-nav-nested-sn-components">
<li class="sidebar-nav-item"><a class="sidebar-nav-link" href="#example-sidebar-nav-nested-sn-actions"><span class="sidebar-nav-label">Actions</span></a></li>
<li class="sidebar-nav-item"><a class="sidebar-nav-link sidebar-nav-current" href="#example-sidebar-nav-nested-sn-navigation" aria-current="page"><span class="sidebar-nav-label">Navigation</span></a></li>
<li class="sidebar-nav-item"><a class="sidebar-nav-link sidebar-nav-link-demo-target" href="#example-sidebar-nav-nested-sn-display"><span class="sidebar-nav-label">Display</span></a></li>
</ul>
</li>
<li class="sidebar-nav-item"><a class="sidebar-nav-link" href="#example-sidebar-nav-nested-sn-ports"><span class="sidebar-nav-icon" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" focusable="false"><path d="M3 8h10M9 4l4 4-4 4"></path></svg></span><span class="sidebar-nav-label">Ports</span></a></li>
</ul>
</nav><p id="example-sidebar-nav-nested-sn-overview" tabindex="-1" class="j3w1-example-target">Example destination: sn overview</p><p id="example-sidebar-nav-nested-sn-actions" tabindex="-1" class="j3w1-example-target">Example destination: sn actions</p><p id="example-sidebar-nav-nested-sn-navigation" tabindex="-1" class="j3w1-example-target">Example destination: sn navigation</p><p id="example-sidebar-nav-nested-sn-display" tabindex="-1" class="j3w1-example-target">Example destination: sn display</p><p id="example-sidebar-nav-nested-sn-ports" tabindex="-1" class="j3w1-example-target">Example destination: sn ports</p></j3w1-sidebar-nav>Install and register
Use the exact version. If npm publication is pending, install the release tarball from the installation guide.
npm install --save-exact @j3w1/ui@1.1.0import '@j3w1/ui/tokens.css';
import '@j3w1/ui/styles/sidebar-nav.css';
import '@j3w1/ui/register/sidebar-nav';Insert the maintained markup above after loading these imports. Its native children provide accessible names and form behavior; the empty custom tag alone does not create a control.
Copy the complete implementation
npx --package=@j3w1/ui@1.1.0 j3w1-ui copy sidebar-nav --out ./vendor/j3w1/sidebar-navThe CLI verifies every file before writing and refuses overwrites. Serve the output over HTTP and open index.html. Keep its modules, CSS, tokens and licence notices together.
Public API
attributes
| Name | Type / signature | Meaning |
|---|---|---|
disabled | CustomEvent | Disable the native controls owned by this instance. |
loading | CustomEvent | Mark the primary control busy and prevent duplicate activation. |
properties
| Name | Type / signature | Meaning |
|---|---|---|
disabled | boolean | Delegates disabled state to native children. |
name | string | Native control name; application form keys remain explicit. |
open | boolean | Native details expansion when this component contains details. |
methods
| Name | Type / signature | Meaning |
|---|---|---|
refresh | (): void | Reconnect behavior after replacing native child structure. |
focus | (options?: FocusOptions): void | Focus the first usable native control. |
events
| Name | Type / signature | Meaning |
|---|---|---|
j3w1-toggle | CustomEvent | A native disclosure or navigation group changed. |
Dependencies and verification
Registered components: none. Style dependencies: none.
Package presence establishes an available implementation. Actual passes depend on the tested artifact and environment. Read specification execution evidence; read packed-consumer evidence; inspect the complete state matrix.
Full implementation manifest, API and token dependency closure