Basic Sidebar
A static navigation column - brand, icon-and-label links, and one clearly marked current page.
6 फ्रेमवर्कशुरुआती
Navigation split into labelled groups, each list tied to its heading as a real group name.
<aside class="flex w-64 flex-col gap-5 border-r border-gray-200 bg-white p-4 dark:border-gray-800 dark:bg-gray-900">
<!-- Each group's <ul> is tied to its heading via aria-labelledby, so the label is a real group name, not just styled text. -->
<nav aria-label="Sidebar">
<p id="grp-main" class="px-3 pb-1 text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400">Main</p>
<ul aria-labelledby="grp-main" class="flex flex-col gap-0.5">
<li><a href="/dashboard" aria-current="page" class="block rounded-md px-3 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 aria-[current=page]:bg-blue-50 aria-[current=page]:text-blue-700 dark:text-gray-300 dark:hover:bg-gray-800 dark:aria-[current=page]:bg-blue-900 dark:aria-[current=page]:text-blue-200">Dashboard</a></li>
<li><a href="/projects" class="block rounded-md px-3 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 dark:text-gray-300 dark:hover:bg-gray-800">Projects</a></li>
</ul>
</nav>
<nav aria-label="Account">
<p id="grp-account" class="px-3 pb-1 text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400">Account</p>
<ul aria-labelledby="grp-account" class="flex flex-col gap-0.5">
<li><a href="/billing" class="block rounded-md px-3 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 dark:text-gray-300 dark:hover:bg-gray-800">Billing</a></li>
</ul>
</nav>
</aside>| Prop | टाइप | डिफ़ॉल्ट | विवरण |
|---|---|---|---|
sectionsआवश्यक | LabeledSection[] | - | Sections |
pathnameआवश्यक | string | - | वर्तमान पथ। इससे मेल खाने वाला आइटम सक्रिय पृष्ठ के रूप में चिह्नित होता है। |
className | string | - | रूट एलिमेंट पर मर्ज होने वाली अतिरिक्त क्लासेज़। |
Each group is its own `<nav>` with an `aria-label`, and each `<ul>` is `aria-labelledby` its uppercase heading - so the label is a real accessible group name, not just styled text a screen reader skips. Pass any number of sections; `aria-current` marks the active link.