Atlassian Design System
JS behaviour
Side Navigation
A left column of square-icon items, collapsible sections and blue selected state — the identity skeleton of every Atlassian cloud app.
Real scenarios
The component as it is used in a product — not a specimen grid.
The skeleton every cloud app wears
Pick items and fold sections — the square icon tiles, the counters and the blue selection all keep working, and the pane retitles itself.
Assigned to me
NABU-241 · Payment webhookIn progress
NABU-247 · Search tokensReview
NABU-253 · Dark theme auditBacklog
Rail and flat siblings
Collapsed to a rail the same items keep their tiles and their blue; without sections the list reads like a quiet menu.
collapsed rail
flat list
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| items | tree | [] | The item tree: heading, link, section and nested items. |
| isSelected | boolean | false | The selected item gains the blue-tinted surface and blue text. |
| badge | slot | null | The counter at the item’s end; like «4 open tasks». |
Snippet
<nav class="atsn">
<p class="atsn-heading">Work items</p>
<button class="atsn-item" data-selected>
<i aria-hidden="true">✦</i> Nabu platform <b>4</b>
</button>
<button class="atsn-item" data-section aria-expanded="true">
<i aria-hidden="true">▸</i> Filters
</button>
<button class="atsn-item" data-nested>Only mine</button>
</nav>
<style>
.atsn { display: grid; gap: 2px; inline-size: 264px; padding: 8px;
background: #FFFFFF; }
.atsn-heading { margin: 8px 8px 4px; font: 700 11px/1.4 Inter, system-ui;
letter-spacing: .4px; text-transform: uppercase; color: #626F86; }
.atsn-item { display: flex; align-items: center; gap: 8px; block-size: 36px;
padding-inline: 8px; border: none; border-radius: 4px;
background: none; font: 400 14px Inter, system-ui; color: #44546F; }
.atsn-item i { display: grid; place-items: center; inline-size: 20px; aspect-ratio: 1;
border-radius: 4px; background: #E9F2FF; color: #0C66E4;
font-style: normal; font-size: 12px; }
.atsn-item[data-selected] { background: #E9F2FF; color: #0C66E4; font-weight: 600; }
.atsn-item b { margin-inline-start: auto; font-size: 11px; color: #626F86; }
</style>
// app/Pages/AppShell.jsx — Inertia page; renders the React snippet
// below unchanged, with Inertia's Link wired into the provider.
import { Link } from '@inertiajs/react';
import { NabuXUIProvider } from '@nabuxai/ui-react';
import CloudNav from '@/components/CloudNav';
export default function AppShell() {
return (
<NabuXUIProvider locale="en" linkComponent={Link}>
<main className="nx-page">
<CloudNav />
</main>
</NabuXUIProvider>
);
}
// CloudNav.jsx — the side-navigation skeleton of every Atlassian cloud app
import { useState } from 'react';
import '@nabuxai/ui-core/css';
const YOUR_WORK = [
{ id: 'assigned', label: 'Assigned to me', count: 4 },
{ id: 'starred', label: 'Starred', count: 2 },
{ id: 'recent', label: 'Recently viewed' },
];
const PROJECTS = [
{ id: 'platform', label: 'Nabu platform' },
{ id: 'mobile', label: 'Nabu mobile' },
{ id: 'web', label: 'Nabu web' },
];
export default function CloudNav() {
const [selected, setSelected] = useState('assigned');
const [open, setOpen] = useState(true);
const item = (p) => (
<button type="button" className="atsn-item" key={p.id}
data-selected={selected === p.id || undefined} onClick={() => setSelected(p.id)}>
<i aria-hidden="true">✦</i> {p.label}
{p.count ? <b>{p.count}</b> : null}
</button>
);
return (
<>
<style>{`
.atsn { display: grid; gap: 2px; inline-size: 16rem; padding: 8px; border: 1px solid #DFE1E6;
border-radius: 6px; background: #fff; font-family: Inter, system-ui, sans-serif; }
.atsn-heading { margin: 8px 8px 4px; font: 700 11px/1.4 Inter, system-ui; letter-spacing: .5px;
text-transform: uppercase; color: #626F86; }
.atsn-item { display: flex; align-items: center; gap: 8px; block-size: 36px; padding-inline: 8px;
border: none; border-radius: 4px; background: none; cursor: pointer; text-align: start;
font: 500 14px Inter, system-ui; color: #44546F; }
.atsn-item:hover { background: #F1F2F4; }
.atsn-item[data-selected] { background: #E9F2FF; color: #0C66E4; font-weight: 600; }
.atsn-item i { display: grid; place-items: center; inline-size: 20px; aspect-ratio: 1; border-radius: 4px;
background: #E9F2FF; color: #0C66E4; font-style: normal; font-size: 12px; }
.atsn-item[data-selected] i { background: #fff; }
.atsn-item b { margin-inline-start: auto; font-size: 11px; color: #626F86; }
.atsn-item svg { margin-inline-start: auto; transition: rotate .2s ease; }
.atsn-item[aria-expanded='true'] svg { rotate: 90deg; }
`}</style>
<nav className="atsn" aria-label="Main navigation">
<p className="atsn-heading">Your work</p>
{YOUR_WORK.map(item)}
{/* Collapsible section: the chevron rotates with aria-expanded. */}
<button type="button" className="atsn-item" aria-expanded={open} onClick={() => setOpen(!open)}>
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor"
strokeWidth="2" aria-hidden="true"><path d="M9 6l6 6-6 6" /></svg>
Projects
</button>
{open && PROJECTS.map(item)}
</nav>
</>
);
}
<!-- CloudNav.vue — the side-navigation skeleton of every Atlassian cloud app -->
<script setup lang="ts">
import { ref } from 'vue';
import '@nabuxai/ui-core/css';
const yourWork = [
{ id: 'assigned', label: 'Assigned to me', count: 4 },
{ id: 'starred', label: 'Starred', count: 2 },
{ id: 'recent', label: 'Recently viewed' },
];
const projects = [
{ id: 'platform', label: 'Nabu platform' },
{ id: 'mobile', label: 'Nabu mobile' },
{ id: 'web', label: 'Nabu web' },
];
const selected = ref('assigned');
const open = ref(true);
</script>
<template>
<nav class="atsn" aria-label="Main navigation">
<p class="atsn-heading">Your work</p>
<!-- Square icon tiles, counters and the blue selected state. -->
<button v-for="p in yourWork" :key="p.id" type="button" class="atsn-item"
:data-selected="selected === p.id || undefined" @click="selected = p.id">
<i aria-hidden="true">✦</i> {{ p.label }}
<b v-if="p.count">{{ p.count }}</b>
</button>
<!-- Collapsible section: the chevron rotates with aria-expanded. -->
<button type="button" class="atsn-item" :aria-expanded="open" @click="open = !open">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" aria-hidden="true"><path d="M9 6l6 6-6 6" /></svg>
Projects
</button>
<template v-if="open">
<button v-for="p in projects" :key="p.id" type="button" class="atsn-item"
:data-selected="selected === p.id || undefined" @click="selected = p.id">
<i aria-hidden="true">✦</i> {{ p.label }}
</button>
</template>
</nav>
</template>
<style scoped>
.atsn { display: grid; gap: 2px; inline-size: 16rem; padding: 8px; border: 1px solid #DFE1E6;
border-radius: 6px; background: #fff; font-family: Inter, system-ui, sans-serif; }
.atsn-heading { margin: 8px 8px 4px; font: 700 11px/1.4 Inter, system-ui; letter-spacing: .5px;
text-transform: uppercase; color: #626F86; }
.atsn-item { display: flex; align-items: center; gap: 8px; block-size: 36px; padding-inline: 8px;
border: none; border-radius: 4px; background: none; cursor: pointer; text-align: start;
font: 500 14px Inter, system-ui; color: #44546F; }
.atsn-item:hover { background: #F1F2F4; }
.atsn-item[data-selected] { background: #E9F2FF; color: #0C66E4; font-weight: 600; }
.atsn-item i { display: grid; place-items: center; inline-size: 20px; aspect-ratio: 1; border-radius: 4px;
background: #E9F2FF; color: #0C66E4; font-style: normal; font-size: 12px; }
.atsn-item[data-selected] i { background: #fff; }
.atsn-item b { margin-inline-start: auto; font-size: 11px; color: #626F86; }
.atsn-item svg { margin-inline-start: auto; transition: rotate .2s ease; }
.atsn-item[aria-expanded='true'] svg { rotate: 90deg; }
</style>
<!-- CloudNav.svelte — the side-navigation skeleton of every Atlassian cloud app -->
<script lang="ts">
import '@nabuxai/ui-core/css';
const yourWork = [
{ id: 'assigned', label: 'Assigned to me', count: 4 },
{ id: 'starred', label: 'Starred', count: 2 },
{ id: 'recent', label: 'Recently viewed' },
];
const projects = [
{ id: 'platform', label: 'Nabu platform' },
{ id: 'mobile', label: 'Nabu mobile' },
{ id: 'web', label: 'Nabu web' },
];
let selected = $state('assigned');
let open = $state(true);
</script>
<nav class="atsn" aria-label="Main navigation">
<p class="atsn-heading">Your work</p>
<!-- Square icon tiles, counters and the blue selected state. -->
{#each yourWork as p (p.id)}
<button type="button" class="atsn-item" data-selected={selected === p.id || undefined}
onclick={() => (selected = p.id)}>
<i aria-hidden="true">✦</i> {p.label}
{#if p.count}<b>{p.count}</b>{/if}
</button>
{/each}
<!-- Collapsible section: the chevron rotates with aria-expanded. -->
<button type="button" class="atsn-item" aria-expanded={open} onclick={() => (open = !open)}>
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" aria-hidden="true"><path d="M9 6l6 6-6 6" /></svg>
Projects
</button>
{#if open}
{#each projects as p (p.id)}
<button type="button" class="atsn-item" data-selected={selected === p.id || undefined}
onclick={() => (selected = p.id)}>
<i aria-hidden="true">✦</i> {p.label}
</button>
{/each}
{/if}
</nav>
<style>
.atsn { display: grid; gap: 2px; inline-size: 16rem; padding: 8px; border: 1px solid #DFE1E6;
border-radius: 6px; background: #fff; font-family: Inter, system-ui, sans-serif; }
.atsn-heading { margin: 8px 8px 4px; font: 700 11px/1.4 Inter, system-ui; letter-spacing: .5px;
text-transform: uppercase; color: #626F86; }
.atsn-item { display: flex; align-items: center; gap: 8px; block-size: 36px; padding-inline: 8px;
border: none; border-radius: 4px; background: none; cursor: pointer; text-align: start;
font: 500 14px Inter, system-ui; color: #44546F; }
.atsn-item:hover { background: #F1F2F4; }
.atsn-item[data-selected] { background: #E9F2FF; color: #0C66E4; font-weight: 600; }
.atsn-item i { display: grid; place-items: center; inline-size: 20px; aspect-ratio: 1; border-radius: 4px;
background: #E9F2FF; color: #0C66E4; font-style: normal; font-size: 12px; }
.atsn-item[data-selected] i { background: #fff; }
.atsn-item b { margin-inline-start: auto; font-size: 11px; color: #626F86; }
.atsn-item svg { margin-inline-start: auto; transition: rotate .2s ease; }
.atsn-item[aria-expanded='true'] svg { rotate: 90deg; }
</style>