Basic Sidebar
A static navigation column - brand, icon-and-label links, and one clearly marked current page.
6 個のフレームワーク初級
A detached, rounded, shadowed card that floats in a padded gutter instead of a flush column.
<!-- A detached card floating in a padded gutter rather than a full-height flush column. -->
<aside class="m-4 flex w-60 flex-col gap-4 rounded-2xl border border-gray-200 bg-white p-4 shadow-lg shadow-gray-900/5 dark:border-gray-800 dark:bg-gray-900 dark:shadow-black/20">
<span class="px-2 text-base font-bold text-gray-900 dark:text-gray-50">Adysre</span>
<nav aria-label="Sidebar">
<ul class="flex flex-col gap-0.5">
<li>
<a href="/dashboard" aria-current="page" class="flex items-center gap-2.5 rounded-xl 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:hover:text-gray-50 dark:aria-[current=page]:bg-blue-900 dark:aria-[current=page]:text-blue-200">
<svg class="h-5 w-5 shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/></svg>
Dashboard
</a>
</li>
<li>
<a href="/projects" class="flex items-center gap-2.5 rounded-xl 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 dark:hover:text-gray-50">
<svg class="h-5 w-5 shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M3 7a2 2 0 0 1 2-2h3l2 2h9a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z"/></svg>
Projects
</a>
</li>
</ul>
</nav>
</aside>| Prop | 型 | デフォルト | 説明 |
|---|---|---|---|
items必須 | SidebarItem[] | - | レンダリングする項目の配列。 |
pathname必須 | string | - | 現在のパス。一致する項目が現在のページとして示されます。 |
title | string | 'Adysre' | カードの見出しテキスト。 |
className | string | - | ルート要素にマージされる追加クラス。 |
The `m-4` gutter and `rounded-2xl` + `shadow-lg` lift it off the page; drop the margin for a flush edge. Everything else is the standard accessible list - `aria-current` on the active link, focus rings on every target.