탐색

v2.1.0
애플리케이션 블록

사이드바

작업 공간, 탐색 메뉴, 계정을 담은 앱 사이드바입니다.

앱 사이드바에는 위에서부터 현재 작업 공간, 작업 공간 내 탐색 메뉴, 사용자 계정이 들어갑니다. 이 블록은 앱 셸의 shell-sidebar 영역을 이러한 항목으로 채웁니다.

사이드바

<div class="shell bg-surface-tray fg-text-body text-sm">  <a class="skip" href="#sb-main">Skip to content</a>  <aside class="shell-sidebar gap-sm p-sm">    <button type="button" class="btn btn-quiet justify-start px(6)" popovertarget="sb-workspace">      <span class="avatar avatar-xs avatar-square" aria-hidden="true">A</span> Atlas Labs <span class="ml-auto fg-text-muted">        <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <path d="M10.25 5L13.1086 7.8586A0.2 0.2 0 0 1 13.1086 8.1414L10.25 11" transform="rotate(-90 8 8)" /><path d="M10.25 5L13.1086 7.8586A0.2 0.2 0 0 1 13.1086 8.1414L10.25 11" transform="rotate(90 8 8)" />        </svg>      </span>    </button>    <div class="menu" id="sb-workspace" popover>      <div class="menu-label">Workspaces</div>      <button type="button" class="menu-item" popovertarget="sb-workspace" popovertargetaction="hide">        Atlas Labs      </button>      <button type="button" class="menu-item" popovertarget="sb-workspace" popovertargetaction="hide">        Personal      </button>      <hr class="menu-separator">      <button type="button" class="menu-item" popovertarget="sb-workspace" popovertargetaction="hide">        <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <path d="M3 8L13 8" /><path d="M8 3L8 13" />        </svg>New workspace      </button>    </div>    <label class="input-group input-group-sm">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <circle cx="7" cy="7" r="4.5" /><path d="M10.182 10.182L14 14" />      </svg>      <input class="input-group-field" type="search" placeholder="Search" aria-label="Search">      <kbd class="kbd">⌘</kbd><kbd class="kbd">K</kbd>    </label>    <nav class="nav" aria-label="Workspace">      <a class="nav-item" href="#">        <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <path d="M3 13L3 6.9624A1 1 0 0 1 3.3524 6.2005L7.3524 2.8005A1 1 0 0 1 8.6476 2.8005L12.6476 6.2005A1 1 0 0 1 13 6.9624L13 13A1 1 0 0 1 12 14L4 14A1 1 0 0 1 3 13Z" /><path d="M6.5 14L6.5 11A1 1 0 0 1 7.5 10L8.5 10A1 1 0 0 1 9.5 11L9.5 14" />        </svg>Overview      </a>      <a class="nav-item" href="#" aria-current="page">        <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <rect x="2.5" y="2.5" width="4" height="4" rx="1" /><rect x="9.5" y="2.5" width="4" height="4" rx="1" /><rect x="2.5" y="9.5" width="4" height="4" rx="1" /><rect x="9.5" y="9.5" width="4" height="4" rx="1" />        </svg>Projects<span class="nav-end">12</span>      </a>      <details class="nav-group" open>        <summary class="nav-item nav-toggle">          <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">            <path d="M8 1.3333C4 4.6667 3.6667 8.6667 5.6667 12.3333H10.3333C12.3333 8.6667 12 4.6667 8 1.3333Z" /><circle cx="8" cy="6.6667" r="0.85" fill="currentColor" stroke="none" /><path d="M10.016 12.3333Q10.1079 12.4463 10.2446 12.5147L12.5342 13.6594A0.6999 0.6999 0 0 0 13.5377 13.1484L14.1443 9.5091Q14.1989 9.1824 13.9807 8.9328L11.9808 6.6473A0.7011 0.7011 0 0 0 11.3582 6.4146C11.5022 7.0678 11.5536 7.7269 11.5195 8.3865L11.635 7.7707L13.1346 9.4845L12.6181 12.5833L10.8942 11.7215L11.1203 10.5157C10.924 11.1275 10.6597 11.7349 10.3333 12.3333H10.016ZM4.6418 6.4146A0.6958 0.6958 0 0 0 4.0192 6.6473L2.0193 8.9328Q1.8012 9.1824 1.8557 9.5091L2.4623 13.1484A0.6999 0.6999 0 0 0 3.4658 13.6594L5.7554 12.5147Q5.8921 12.4463 5.984 12.3333H5.6667C5.3403 11.7349 5.076 11.1275 4.8797 10.5157L5.1058 11.7215L3.3819 12.5833L2.8654 9.4845L4.365 7.7707L4.4805 8.3865C4.4464 7.7269 4.4978 7.0678 4.6418 6.4146Z" fill="currentColor" stroke="none" fill-rule="evenodd" /><path d="M6.6667 15L9.3333 15" />          </svg>Deployments<svg class="icon nav-chevron" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">            <path d="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" transform="rotate(90 8 8)" />          </svg>        </summary>        <div class="nav-sub">          <a class="nav-item" href="#">Production</a>          <a class="nav-item" href="#">Preview<span class="nav-end">3</span></a>        </div>      </details>      <a class="nav-item" href="#">        <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <circle cx="8" cy="8" r="6" /><path d="M8.7707 2.0497A6.0005 6.0005 0 0 0 7.2293 2.0497Q6.1162 3.1938 5.4813 4.6077Q4.8542 6.0044 4.7648 7.5H2.0209A5.9913 5.9913 0 0 0 2.0209 8.5H4.7648Q4.8542 9.9956 5.4813 11.3923Q6.1162 12.8062 7.2293 13.9503A6.0005 6.0005 0 0 0 8.7707 13.9503Q9.8838 12.8062 10.5187 11.3923Q11.1458 9.9956 11.2352 8.5H13.9791A5.9913 5.9913 0 0 0 13.9791 7.5H11.2352Q11.1458 6.0044 10.5187 4.6077Q9.8838 3.1938 8.7707 2.0497ZM9.6064 5.0173Q10.1455 6.2181 10.2331 7.5H5.7669Q5.8545 6.2181 6.3936 5.0173Q6.971 3.7314 8 2.6921Q9.029 3.7314 9.6064 5.0173ZM6.3936 10.9827Q5.8545 9.7819 5.7669 8.5H10.2331Q10.1455 9.7819 9.6064 10.9827Q9.029 12.2686 8 13.3079Q6.971 12.2686 6.3936 10.9827Z" fill="currentColor" stroke="none" fill-rule="evenodd" />        </svg>Domains      </a>      <a class="nav-item" href="#">        <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <rect x="2" y="8" width="2.5" height="6" rx="0.75" /><rect x="6.75" y="3" width="2.5" height="11" rx="0.75" /><rect x="11.5" y="6" width="2.5" height="8" rx="0.75" />        </svg>Analytics      </a>      <div class="nav-label">Team</div>      <a class="nav-item" href="#">        <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <circle cx="6.25" cy="4.5" r="2" /><path d="M2.25 13.75V12.5C2.25 10.7 3.85 9.5 5.35 9.5H7.15C8.65 9.5 10.25 10.7 10.25 12.5V13.75" /><path d="M11.1 2.6C13.8 2.6 13.8 6.6 11.1 6.6" /><path d="M12 9.5C13.5 9.75 14.25 11.25 14.25 12.5V13.75" />        </svg>Members      </a>      <a class="nav-item" href="#">        <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <rect x="1.6667" y="3.3333" width="12.6667" height="9.3333" rx="1" /><path d="M1.6667 6.6667L14.3333 6.6667" /><path d="M4 10L6.6667 10" />        </svg>Billing      </a>      <a class="nav-item" href="#">        <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <path d="M2.5 4.5L4.5 4.5" /><circle cx="6" cy="4.5" r="1.5" /><path d="M7.5 4.5L13.5 4.5" /><path d="M2.5 11.5L8.5 11.5" /><circle cx="10" cy="11.5" r="1.5" /><path d="M11.5 11.5L13.5 11.5" />        </svg>Settings      </a>    </nav>    <div class="flex flex-col gap-sm mt-auto">      <section class="well flex flex-col gap-xs p-sm" aria-labelledby="sb-usage">        <div class="flex items-baseline justify-between gap-sm text-xs">          <span class="fg-text-strong" id="sb-usage">Build minutes</span>          <span class="fg-text-muted">296 of 400</span>        </div>        <meter class="meter meter-sm" min="0" max="400" low="240" high="360" optimum="0" value="296" aria-labelledby="sb-usage">          296 of 400 build minutes        </meter>        <a class="link text-xs self-start" href="#">Upgrade</a>      </section>      <button type="button" class="btn btn-quiet justify-start px(6)" popovertarget="sb-account">        <span class="avatar avatar-xs">          <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="256" height="256">        </span> Yi-ching Lin <span class="ml-auto fg-text-muted">          <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">            <circle cx="3.5" cy="8" r="1.05" fill="currentColor" stroke="none" /><circle cx="8" cy="8" r="1.05" fill="currentColor" stroke="none" /><circle cx="12.5" cy="8" r="1.05" fill="currentColor" stroke="none" />          </svg>        </span>      </button>      <div class="menu menu-top" id="sb-account" popover>        <a class="menu-item" href="#">Account settings</a>        <a class="menu-item" href="#">Keyboard shortcuts</a>        <hr class="menu-separator">        <button type="button" class="menu-item" popovertarget="sb-account" popovertargetaction="hide">          <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">            <path d="M6.6667 2.6667L3.6667 2.6667A1 1 0 0 0 2.6667 3.6667L2.6667 12.3333A1 1 0 0 0 3.6667 13.3333L6.6667 13.3333" /><path d="M14.285 7.5892A0.4996 0.4996 0 0 0 14 7.5L6.6422 7.5006A0.5 0.5 0 0 0 6.5933 8.4946L6.6667 8.5L14.0379 8.4986A0.5007 0.5007 0 0 0 14.285 8.4108A0.7044 0.7044 0 0 0 14.285 7.5892Z" fill="currentColor" stroke="none" fill-rule="evenodd" /><path d="M10.6667 4.6667L13.8586 7.8586A0.2 0.2 0 0 1 13.8586 8.1414L10.6667 11.3333" />          </svg>Sign out        </button>      </div>    </div>  </aside>  <div class="shell-main flex flex-col gap(8) p(8) pxs(0)@container(--3xl)">    <button type="button" class="btn btn-sm shell-toggle self-start" commandfor="sb-drawer" command="show-modal">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <path d="M2.6667 4L13.3333 4" /><path d="M2.6667 8L13.3333 8" /><path d="M2.6667 12L13.3333 12" />      </svg>Menu    </button>    <main class="sheet grow(1) flex items-center justify-center p-xl" id="sb-main" tabindex="-1">      <p class="m(0) fg-text-muted text-center max-w(320)">        The sidebar is the block. The sheet beside it is where the page goes.      </p>    </main>  </div>  <dialog class="dialog dialog-drawer dialog-drawer-start" id="sb-drawer" closedby="any" aria-label="Navigation">    <div class="dialog-body flex flex-col gap-sm">      <p class="m(0) px-xs h(32) flex items-center fg-text-strong font-medium">Atlas Labs</p>      <nav class="nav" aria-label="Workspace, in the drawer">        <a class="nav-item" href="#">          <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">            <path d="M3 13L3 6.9624A1 1 0 0 1 3.3524 6.2005L7.3524 2.8005A1 1 0 0 1 8.6476 2.8005L12.6476 6.2005A1 1 0 0 1 13 6.9624L13 13A1 1 0 0 1 12 14L4 14A1 1 0 0 1 3 13Z" /><path d="M6.5 14L6.5 11A1 1 0 0 1 7.5 10L8.5 10A1 1 0 0 1 9.5 11L9.5 14" />          </svg>Overview        </a>        <a class="nav-item" href="#" aria-current="page">          <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">            <rect x="2.5" y="2.5" width="4" height="4" rx="1" /><rect x="9.5" y="2.5" width="4" height="4" rx="1" /><rect x="2.5" y="9.5" width="4" height="4" rx="1" /><rect x="9.5" y="9.5" width="4" height="4" rx="1" />          </svg>Projects<span class="nav-end">12</span>        </a>        <details class="nav-group" open>          <summary class="nav-item nav-toggle">            <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">              <path d="M8 1.3333C4 4.6667 3.6667 8.6667 5.6667 12.3333H10.3333C12.3333 8.6667 12 4.6667 8 1.3333Z" /><circle cx="8" cy="6.6667" r="0.85" fill="currentColor" stroke="none" /><path d="M10.016 12.3333Q10.1079 12.4463 10.2446 12.5147L12.5342 13.6594A0.6999 0.6999 0 0 0 13.5377 13.1484L14.1443 9.5091Q14.1989 9.1824 13.9807 8.9328L11.9808 6.6473A0.7011 0.7011 0 0 0 11.3582 6.4146C11.5022 7.0678 11.5536 7.7269 11.5195 8.3865L11.635 7.7707L13.1346 9.4845L12.6181 12.5833L10.8942 11.7215L11.1203 10.5157C10.924 11.1275 10.6597 11.7349 10.3333 12.3333H10.016ZM4.6418 6.4146A0.6958 0.6958 0 0 0 4.0192 6.6473L2.0193 8.9328Q1.8012 9.1824 1.8557 9.5091L2.4623 13.1484A0.6999 0.6999 0 0 0 3.4658 13.6594L5.7554 12.5147Q5.8921 12.4463 5.984 12.3333H5.6667C5.3403 11.7349 5.076 11.1275 4.8797 10.5157L5.1058 11.7215L3.3819 12.5833L2.8654 9.4845L4.365 7.7707L4.4805 8.3865C4.4464 7.7269 4.4978 7.0678 4.6418 6.4146Z" fill="currentColor" stroke="none" fill-rule="evenodd" /><path d="M6.6667 15L9.3333 15" />            </svg>Deployments<svg class="icon nav-chevron" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">              <path d="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" transform="rotate(90 8 8)" />            </svg>          </summary>          <div class="nav-sub">            <a class="nav-item" href="#">Production</a>            <a class="nav-item" href="#">Preview<span class="nav-end">3</span></a>          </div>        </details>        <a class="nav-item" href="#">          <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">            <circle cx="8" cy="8" r="6" /><path d="M8.7707 2.0497A6.0005 6.0005 0 0 0 7.2293 2.0497Q6.1162 3.1938 5.4813 4.6077Q4.8542 6.0044 4.7648 7.5H2.0209A5.9913 5.9913 0 0 0 2.0209 8.5H4.7648Q4.8542 9.9956 5.4813 11.3923Q6.1162 12.8062 7.2293 13.9503A6.0005 6.0005 0 0 0 8.7707 13.9503Q9.8838 12.8062 10.5187 11.3923Q11.1458 9.9956 11.2352 8.5H13.9791A5.9913 5.9913 0 0 0 13.9791 7.5H11.2352Q11.1458 6.0044 10.5187 4.6077Q9.8838 3.1938 8.7707 2.0497ZM9.6064 5.0173Q10.1455 6.2181 10.2331 7.5H5.7669Q5.8545 6.2181 6.3936 5.0173Q6.971 3.7314 8 2.6921Q9.029 3.7314 9.6064 5.0173ZM6.3936 10.9827Q5.8545 9.7819 5.7669 8.5H10.2331Q10.1455 9.7819 9.6064 10.9827Q9.029 12.2686 8 13.3079Q6.971 12.2686 6.3936 10.9827Z" fill="currentColor" stroke="none" fill-rule="evenodd" />          </svg>Domains        </a>        <a class="nav-item" href="#">          <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">            <rect x="2" y="8" width="2.5" height="6" rx="0.75" /><rect x="6.75" y="3" width="2.5" height="11" rx="0.75" /><rect x="11.5" y="6" width="2.5" height="8" rx="0.75" />          </svg>Analytics        </a>        <div class="nav-label">Team</div>        <a class="nav-item" href="#">          <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">            <circle cx="6.25" cy="4.5" r="2" /><path d="M2.25 13.75V12.5C2.25 10.7 3.85 9.5 5.35 9.5H7.15C8.65 9.5 10.25 10.7 10.25 12.5V13.75" /><path d="M11.1 2.6C13.8 2.6 13.8 6.6 11.1 6.6" /><path d="M12 9.5C13.5 9.75 14.25 11.25 14.25 12.5V13.75" />          </svg>Members        </a>        <a class="nav-item" href="#">          <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">            <rect x="1.6667" y="3.3333" width="12.6667" height="9.3333" rx="1" /><path d="M1.6667 6.6667L14.3333 6.6667" /><path d="M4 10L6.6667 10" />          </svg>Billing        </a>        <a class="nav-item" href="#">          <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">            <path d="M2.5 4.5L4.5 4.5" /><circle cx="6" cy="4.5" r="1.5" /><path d="M7.5 4.5L13.5 4.5" /><path d="M2.5 11.5L8.5 11.5" /><circle cx="10" cy="11.5" r="1.5" /><path d="M11.5 11.5L13.5 11.5" />          </svg>Settings        </a>      </nav>    </div>    <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="sb-drawer" command="close" aria-label="Close navigation">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <path d="M4 4L12 12" /><path d="M4 12L12 4" />      </svg>    </button>  </dialog></div>
import ChevronsUpDownIcon from '@master/icons-react/native/16/soft/chevrons-up-down'import PlusIcon from '@master/icons-react/native/16/soft/plus'import SearchIcon from '@master/icons-react/native/16/soft/search'import HomeIcon from '@master/icons-react/native/16/soft/home'import GridIcon from '@master/icons-react/native/16/soft/grid'import RocketIcon from '@master/icons-react/native/16/soft/rocket'import ChevronDownIcon from '@master/icons-react/native/16/soft/chevron-down'import GlobeIcon from '@master/icons-react/native/16/soft/globe'import ChartBarIcon from '@master/icons-react/native/16/soft/chart-bar'import UsersIcon from '@master/icons-react/native/16/soft/users'import CreditCardIcon from '@master/icons-react/native/16/soft/credit-card'import SlidersIcon from '@master/icons-react/native/16/soft/sliders'import MoreHorizontalIcon from '@master/icons-react/native/16/soft/more-horizontal'import LogOutIcon from '@master/icons-react/native/16/soft/log-out'import BarsIcon from '@master/icons-react/native/16/soft/bars'import XIcon from '@master/icons-react/native/16/soft/x'<div className="shell bg-surface-tray fg-text-body text-sm">  <a className="skip" href="#sb-main">Skip to content</a>  <aside className="shell-sidebar gap-sm p-sm">    <button type="button" className="btn btn-quiet justify-start px(6)" popoverTarget="sb-workspace">      <span className="avatar avatar-xs avatar-square" aria-hidden="true">A</span> Atlas Labs <span className="ml-auto fg-text-muted"><ChevronsUpDownIcon className="icon" /></span>    </button>    <div className="menu" id="sb-workspace" popover="">      <div className="menu-label">Workspaces</div>      <button type="button" className="menu-item" popoverTarget="sb-workspace" popoverTargetAction="hide">        Atlas Labs      </button>      <button type="button" className="menu-item" popoverTarget="sb-workspace" popoverTargetAction="hide">        Personal      </button>      <hr className="menu-separator" />      <button type="button" className="menu-item" popoverTarget="sb-workspace" popoverTargetAction="hide">        <PlusIcon className="icon" />New workspace      </button>    </div>    <label className="input-group input-group-sm">      <SearchIcon className="icon" />      <input className="input-group-field" type="search" placeholder="Search" aria-label="Search" />      <kbd className="kbd">⌘</kbd><kbd className="kbd">K</kbd>    </label>    <nav className="nav" aria-label="Workspace">      <a className="nav-item" href="#"><HomeIcon className="icon" />Overview</a>      <a className="nav-item" href="#" aria-current="page">        <GridIcon className="icon" />Projects<span className="nav-end">12</span>      </a>      <details className="nav-group" open>        <summary className="nav-item nav-toggle">          <RocketIcon className="icon" />Deployments<ChevronDownIcon className="icon nav-chevron" />        </summary>        <div className="nav-sub">          <a className="nav-item" href="#">Production</a>          <a className="nav-item" href="#">Preview<span className="nav-end">3</span></a>        </div>      </details>      <a className="nav-item" href="#"><GlobeIcon className="icon" />Domains</a>      <a className="nav-item" href="#"><ChartBarIcon className="icon" />Analytics</a>      <div className="nav-label">Team</div>      <a className="nav-item" href="#"><UsersIcon className="icon" />Members</a>      <a className="nav-item" href="#"><CreditCardIcon className="icon" />Billing</a>      <a className="nav-item" href="#"><SlidersIcon className="icon" />Settings</a>    </nav>    <div className="flex flex-col gap-sm mt-auto">      <section className="well flex flex-col gap-xs p-sm" aria-labelledby="sb-usage">        <div className="flex items-baseline justify-between gap-sm text-xs">          <span className="fg-text-strong" id="sb-usage">Build minutes</span>          <span className="fg-text-muted">296 of 400</span>        </div>        <meter className="meter meter-sm" min="0" max="400" low={240} high={360} optimum={0} value="296" aria-labelledby="sb-usage">          296 of 400 build minutes        </meter>        <a className="link text-xs self-start" href="#">Upgrade</a>      </section>      <button type="button" className="btn btn-quiet justify-start px(6)" popoverTarget="sb-account">        <span className="avatar avatar-xs">          <img className="avatar-image" src="/demo/people/yiching-lin.webp" alt="" width="256" height="256" />        </span> Yi-ching Lin <span className="ml-auto fg-text-muted"><MoreHorizontalIcon className="icon" /></span>      </button>      <div className="menu menu-top" id="sb-account" popover="">        <a className="menu-item" href="#">Account settings</a>        <a className="menu-item" href="#">Keyboard shortcuts</a>        <hr className="menu-separator" />        <button type="button" className="menu-item" popoverTarget="sb-account" popoverTargetAction="hide">          <LogOutIcon className="icon" />Sign out        </button>      </div>    </div>  </aside>  <div className="shell-main flex flex-col gap(8) p(8) pxs(0)@container(--3xl)">    <button type="button" className="btn btn-sm shell-toggle self-start" {...{ commandfor: 'sb-drawer', command: 'show-modal' }}>      <BarsIcon className="icon" />Menu    </button>    <main className="sheet grow(1) flex items-center justify-center p-xl" id="sb-main" tabIndex={-1}>      <p className="m(0) fg-text-muted text-center max-w(320)">        The sidebar is the block. The sheet beside it is where the page goes.      </p>    </main>  </div>  <dialog className="dialog dialog-drawer dialog-drawer-start" id="sb-drawer" closedby="any" aria-label="Navigation">    <div className="dialog-body flex flex-col gap-sm">      <p className="m(0) px-xs h(32) flex items-center fg-text-strong font-medium">Atlas Labs</p>      <nav className="nav" aria-label="Workspace, in the drawer">        <a className="nav-item" href="#"><HomeIcon className="icon" />Overview</a>        <a className="nav-item" href="#" aria-current="page">          <GridIcon className="icon" />Projects<span className="nav-end">12</span>        </a>        <details className="nav-group" open>          <summary className="nav-item nav-toggle">            <RocketIcon className="icon" />Deployments<ChevronDownIcon className="icon nav-chevron" />          </summary>          <div className="nav-sub">            <a className="nav-item" href="#">Production</a>            <a className="nav-item" href="#">Preview<span className="nav-end">3</span></a>          </div>        </details>        <a className="nav-item" href="#"><GlobeIcon className="icon" />Domains</a>        <a className="nav-item" href="#"><ChartBarIcon className="icon" />Analytics</a>        <div className="nav-label">Team</div>        <a className="nav-item" href="#"><UsersIcon className="icon" />Members</a>        <a className="nav-item" href="#"><CreditCardIcon className="icon" />Billing</a>        <a className="nav-item" href="#"><SlidersIcon className="icon" />Settings</a>      </nav>    </div>    <button type="button" className="btn btn-quiet btn-square btn-sm dialog-close" {...{ commandfor: 'sb-drawer', command: 'close' }} aria-label="Close navigation">      <XIcon className="icon" />    </button>  </dialog></div>
<script>  import ChevronsUpDownIcon from '@master/icons-svelte/native/16/soft/chevrons-up-down'  import PlusIcon from '@master/icons-svelte/native/16/soft/plus'  import SearchIcon from '@master/icons-svelte/native/16/soft/search'  import HomeIcon from '@master/icons-svelte/native/16/soft/home'  import GridIcon from '@master/icons-svelte/native/16/soft/grid'  import RocketIcon from '@master/icons-svelte/native/16/soft/rocket'  import ChevronDownIcon from '@master/icons-svelte/native/16/soft/chevron-down'  import GlobeIcon from '@master/icons-svelte/native/16/soft/globe'  import ChartBarIcon from '@master/icons-svelte/native/16/soft/chart-bar'  import UsersIcon from '@master/icons-svelte/native/16/soft/users'  import CreditCardIcon from '@master/icons-svelte/native/16/soft/credit-card'  import SlidersIcon from '@master/icons-svelte/native/16/soft/sliders'  import MoreHorizontalIcon from '@master/icons-svelte/native/16/soft/more-horizontal'  import LogOutIcon from '@master/icons-svelte/native/16/soft/log-out'  import BarsIcon from '@master/icons-svelte/native/16/soft/bars'  import XIcon from '@master/icons-svelte/native/16/soft/x'</script><div class="shell bg-surface-tray fg-text-body text-sm">  <a class="skip" href="#sb-main">Skip to content</a>  <aside class="shell-sidebar gap-sm p-sm">    <button type="button" class="btn btn-quiet justify-start px(6)" popovertarget="sb-workspace">      <span class="avatar avatar-xs avatar-square" aria-hidden="true">A</span> Atlas Labs <span class="ml-auto fg-text-muted"><ChevronsUpDownIcon class="icon" /></span>    </button>    <div class="menu" id="sb-workspace" popover>      <div class="menu-label">Workspaces</div>      <button type="button" class="menu-item" popovertarget="sb-workspace" popovertargetaction="hide">        Atlas Labs      </button>      <button type="button" class="menu-item" popovertarget="sb-workspace" popovertargetaction="hide">        Personal      </button>      <hr class="menu-separator">      <button type="button" class="menu-item" popovertarget="sb-workspace" popovertargetaction="hide">        <PlusIcon class="icon" />New workspace      </button>    </div>    <label class="input-group input-group-sm">      <SearchIcon class="icon" />      <input class="input-group-field" type="search" placeholder="Search" aria-label="Search">      <kbd class="kbd">⌘</kbd><kbd class="kbd">K</kbd>    </label>    <nav class="nav" aria-label="Workspace">      <a class="nav-item" href="#"><HomeIcon class="icon" />Overview</a>      <a class="nav-item" href="#" aria-current="page">        <GridIcon class="icon" />Projects<span class="nav-end">12</span>      </a>      <details class="nav-group" open>        <summary class="nav-item nav-toggle">          <RocketIcon class="icon" />Deployments<ChevronDownIcon class="icon nav-chevron" />        </summary>        <div class="nav-sub">          <a class="nav-item" href="#">Production</a>          <a class="nav-item" href="#">Preview<span class="nav-end">3</span></a>        </div>      </details>      <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a>      <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a>      <div class="nav-label">Team</div>      <a class="nav-item" href="#"><UsersIcon class="icon" />Members</a>      <a class="nav-item" href="#"><CreditCardIcon class="icon" />Billing</a>      <a class="nav-item" href="#"><SlidersIcon class="icon" />Settings</a>    </nav>    <div class="flex flex-col gap-sm mt-auto">      <section class="well flex flex-col gap-xs p-sm" aria-labelledby="sb-usage">        <div class="flex items-baseline justify-between gap-sm text-xs">          <span class="fg-text-strong" id="sb-usage">Build minutes</span>          <span class="fg-text-muted">296 of 400</span>        </div>        <meter class="meter meter-sm" min="0" max="400" low="240" high="360" optimum="0" value="296" aria-labelledby="sb-usage">          296 of 400 build minutes        </meter>        <a class="link text-xs self-start" href="#">Upgrade</a>      </section>      <button type="button" class="btn btn-quiet justify-start px(6)" popovertarget="sb-account">        <span class="avatar avatar-xs">          <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="256" height="256">        </span> Yi-ching Lin <span class="ml-auto fg-text-muted"><MoreHorizontalIcon class="icon" /></span>      </button>      <div class="menu menu-top" id="sb-account" popover>        <a class="menu-item" href="#">Account settings</a>        <a class="menu-item" href="#">Keyboard shortcuts</a>        <hr class="menu-separator">        <button type="button" class="menu-item" popovertarget="sb-account" popovertargetaction="hide">          <LogOutIcon class="icon" />Sign out        </button>      </div>    </div>  </aside>  <div class="shell-main flex flex-col gap(8) p(8) pxs(0)@container(--3xl)">    <button type="button" class="btn btn-sm shell-toggle self-start" commandfor="sb-drawer" command="show-modal">      <BarsIcon class="icon" />Menu    </button>    <main class="sheet grow(1) flex items-center justify-center p-xl" id="sb-main" tabindex="-1">      <p class="m(0) fg-text-muted text-center max-w(320)">        The sidebar is the block. The sheet beside it is where the page goes.      </p>    </main>  </div>  <dialog class="dialog dialog-drawer dialog-drawer-start" id="sb-drawer" closedby="any" aria-label="Navigation">    <div class="dialog-body flex flex-col gap-sm">      <p class="m(0) px-xs h(32) flex items-center fg-text-strong font-medium">Atlas Labs</p>      <nav class="nav" aria-label="Workspace, in the drawer">        <a class="nav-item" href="#"><HomeIcon class="icon" />Overview</a>        <a class="nav-item" href="#" aria-current="page">          <GridIcon class="icon" />Projects<span class="nav-end">12</span>        </a>        <details class="nav-group" open>          <summary class="nav-item nav-toggle">            <RocketIcon class="icon" />Deployments<ChevronDownIcon class="icon nav-chevron" />          </summary>          <div class="nav-sub">            <a class="nav-item" href="#">Production</a>            <a class="nav-item" href="#">Preview<span class="nav-end">3</span></a>          </div>        </details>        <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a>        <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a>        <div class="nav-label">Team</div>        <a class="nav-item" href="#"><UsersIcon class="icon" />Members</a>        <a class="nav-item" href="#"><CreditCardIcon class="icon" />Billing</a>        <a class="nav-item" href="#"><SlidersIcon class="icon" />Settings</a>      </nav>    </div>    <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="sb-drawer" command="close" aria-label="Close navigation">      <XIcon class="icon" />    </button>  </dialog></div>
<script setup>import ChevronsUpDownIcon from '@master/icons-vue/native/16/soft/chevrons-up-down'import PlusIcon from '@master/icons-vue/native/16/soft/plus'import SearchIcon from '@master/icons-vue/native/16/soft/search'import HomeIcon from '@master/icons-vue/native/16/soft/home'import GridIcon from '@master/icons-vue/native/16/soft/grid'import RocketIcon from '@master/icons-vue/native/16/soft/rocket'import ChevronDownIcon from '@master/icons-vue/native/16/soft/chevron-down'import GlobeIcon from '@master/icons-vue/native/16/soft/globe'import ChartBarIcon from '@master/icons-vue/native/16/soft/chart-bar'import UsersIcon from '@master/icons-vue/native/16/soft/users'import CreditCardIcon from '@master/icons-vue/native/16/soft/credit-card'import SlidersIcon from '@master/icons-vue/native/16/soft/sliders'import MoreHorizontalIcon from '@master/icons-vue/native/16/soft/more-horizontal'import LogOutIcon from '@master/icons-vue/native/16/soft/log-out'import BarsIcon from '@master/icons-vue/native/16/soft/bars'import XIcon from '@master/icons-vue/native/16/soft/x'</script><template>  <div class="shell bg-surface-tray fg-text-body text-sm">    <a class="skip" href="#sb-main">Skip to content</a>    <aside class="shell-sidebar gap-sm p-sm">      <button type="button" class="btn btn-quiet justify-start px(6)" popovertarget="sb-workspace">        <span class="avatar avatar-xs avatar-square" aria-hidden="true">A</span> Atlas Labs <span class="ml-auto fg-text-muted"><ChevronsUpDownIcon class="icon" /></span>      </button>      <div class="menu" id="sb-workspace" popover>        <div class="menu-label">Workspaces</div>        <button type="button" class="menu-item" popovertarget="sb-workspace" popovertargetaction="hide">          Atlas Labs        </button>        <button type="button" class="menu-item" popovertarget="sb-workspace" popovertargetaction="hide">          Personal        </button>        <hr class="menu-separator">        <button type="button" class="menu-item" popovertarget="sb-workspace" popovertargetaction="hide">          <PlusIcon class="icon" />New workspace        </button>      </div>      <label class="input-group input-group-sm">        <SearchIcon class="icon" />        <input class="input-group-field" type="search" placeholder="Search" aria-label="Search">        <kbd class="kbd">⌘</kbd><kbd class="kbd">K</kbd>      </label>      <nav class="nav" aria-label="Workspace">        <a class="nav-item" href="#"><HomeIcon class="icon" />Overview</a>        <a class="nav-item" href="#" aria-current="page">          <GridIcon class="icon" />Projects<span class="nav-end">12</span>        </a>        <details class="nav-group" open>          <summary class="nav-item nav-toggle">            <RocketIcon class="icon" />Deployments<ChevronDownIcon class="icon nav-chevron" />          </summary>          <div class="nav-sub">            <a class="nav-item" href="#">Production</a>            <a class="nav-item" href="#">Preview<span class="nav-end">3</span></a>          </div>        </details>        <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a>        <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a>        <div class="nav-label">Team</div>        <a class="nav-item" href="#"><UsersIcon class="icon" />Members</a>        <a class="nav-item" href="#"><CreditCardIcon class="icon" />Billing</a>        <a class="nav-item" href="#"><SlidersIcon class="icon" />Settings</a>      </nav>      <div class="flex flex-col gap-sm mt-auto">        <section class="well flex flex-col gap-xs p-sm" aria-labelledby="sb-usage">          <div class="flex items-baseline justify-between gap-sm text-xs">            <span class="fg-text-strong" id="sb-usage">Build minutes</span>            <span class="fg-text-muted">296 of 400</span>          </div>          <meter class="meter meter-sm" min="0" max="400" low="240" high="360" optimum="0" value="296" aria-labelledby="sb-usage">            296 of 400 build minutes          </meter>          <a class="link text-xs self-start" href="#">Upgrade</a>        </section>        <button type="button" class="btn btn-quiet justify-start px(6)" popovertarget="sb-account">          <span class="avatar avatar-xs">            <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="256" height="256">          </span> Yi-ching Lin <span class="ml-auto fg-text-muted"><MoreHorizontalIcon class="icon" /></span>        </button>        <div class="menu menu-top" id="sb-account" popover>          <a class="menu-item" href="#">Account settings</a>          <a class="menu-item" href="#">Keyboard shortcuts</a>          <hr class="menu-separator">          <button type="button" class="menu-item" popovertarget="sb-account" popovertargetaction="hide">            <LogOutIcon class="icon" />Sign out          </button>        </div>      </div>    </aside>    <div class="shell-main flex flex-col gap(8) p(8) pxs(0)@container(--3xl)">      <button type="button" class="btn btn-sm shell-toggle self-start" commandfor="sb-drawer" command="show-modal">        <BarsIcon class="icon" />Menu      </button>      <main class="sheet grow(1) flex items-center justify-center p-xl" id="sb-main" tabindex="-1">        <p class="m(0) fg-text-muted text-center max-w(320)">          The sidebar is the block. The sheet beside it is where the page goes.        </p>      </main>    </div>    <dialog class="dialog dialog-drawer dialog-drawer-start" id="sb-drawer" closedby="any" aria-label="Navigation">      <div class="dialog-body flex flex-col gap-sm">        <p class="m(0) px-xs h(32) flex items-center fg-text-strong font-medium">Atlas Labs</p>        <nav class="nav" aria-label="Workspace, in the drawer">          <a class="nav-item" href="#"><HomeIcon class="icon" />Overview</a>          <a class="nav-item" href="#" aria-current="page">            <GridIcon class="icon" />Projects<span class="nav-end">12</span>          </a>          <details class="nav-group" open>            <summary class="nav-item nav-toggle">              <RocketIcon class="icon" />Deployments<ChevronDownIcon class="icon nav-chevron" />            </summary>            <div class="nav-sub">              <a class="nav-item" href="#">Production</a>              <a class="nav-item" href="#">Preview<span class="nav-end">3</span></a>            </div>          </details>          <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a>          <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a>          <div class="nav-label">Team</div>          <a class="nav-item" href="#"><UsersIcon class="icon" />Members</a>          <a class="nav-item" href="#"><CreditCardIcon class="icon" />Billing</a>          <a class="nav-item" href="#"><SlidersIcon class="icon" />Settings</a>        </nav>      </div>      <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="sb-drawer" command="close" aria-label="Close navigation">        <XIcon class="icon" />      </button>    </dialog>  </div></template>
상단의 작업 공간 버튼과 하단의 계정 버튼을 눌러 메뉴를 열어 봅니다. 각 메뉴는 해당 버튼을 기준으로 열립니다. 휴대폰을 선택하면 사이드바가 사라지고, 메뉴 버튼을 누르면 드로어에서 같은 탐색 메뉴가 열립니다.

이 블록은 <aside class="shell-sidebar"> 안의 모든 내용을 포함합니다. 앱 셸은 사이드바의 위치와 높이, 레이아웃에서 빠지는 시점을 정하고 블록은 사이드바 안의 구성을 정합니다.

#구성

  • 작업 공간은 메뉴를 여는 차분한 스타일의 버튼입니다. justify-start는 콘텐츠를 시작 쪽에 정렬하고, ml-auto는 표시 기호를 끝 쪽으로 밀어냅니다. 이름 옆의 글자는 아바타입니다. 이름이 이미 표시되므로 아바타는 보조 기술에서 숨깁니다.
  • 검색은 작은 입력 그룹으로 구성합니다. 단축키는 두 키에 각각 하나씩 키캡을 배치해 표시하고, 명령 팔레트에 연결합니다.
  • 탐색 메뉴는 아이콘, 개수 표시, 그룹, 레이블을 갖춘 내비게이션 목록 컴포넌트입니다. 그룹에는 네이티브 <details> 요소를 사용하므로 스크립트 없이 열 수 있습니다.
  • 사용량은 미터가 들어 있는 오목한 영역에 표시합니다. 요금제에서 확인할 항목인 빌드 시간(분)과 요금제를 변경할 수 있는 링크를 표시합니다.
  • 계정은 버튼 위쪽에 메뉴를 여는 차분한 스타일의 버튼입니다(menu-top). 열의 마지막 항목이며, mt-auto를 적용해 맨 아래에 배치합니다.
  • 한 열에 일정한 간격으로 배치합니다. 사이드바는 세로 방향의 플렉스 컨테이너입니다. gap-sm은 항목 사이에 간격을 두고, p-sm은 항목과 가장자리 사이에 여백을 둡니다. 마지막 그룹에 mt-auto를 적용하면 그룹이 맨 아래에 배치됩니다.
  • 사이드바는 자체적으로 스크롤됩니다. 탐색 메뉴가 뷰포트보다 길어지면 shell-sidebar 설정에 따라 스크롤할 수 있습니다.
  • 사이드바에는 별도의 표면이 없습니다. 앱 셸의 트레이 위에 놓입니다. 현재 페이지에 해당하는 행은 탐색 컴포넌트의 자체 동작에 따라 작은 볼록한 표면으로 표시됩니다.

#드로어의 탐색 메뉴

앱 셸의 너비가 48rem 미만이면 사이드바가 레이아웃에서 빠집니다. 사이드바를 숨기기만 하면 휴대전화에서 탐색 메뉴를 이용할 수 없습니다. 위 예제에서는 사이드바가 사라진 동안에만 shell-toggle이 지정된 버튼을 표시합니다. 이 버튼은 dialog-drawer-start가 지정된 드로어를 열며, 드로어에는 같은 탐색 메뉴가 별도의 레이블로 제공됩니다. 전체 레이아웃은 앱 셸에서 확인할 수 있습니다. 휴대전화에는 자체 검색 기능이 있으므로 드로어에서는 검색을 생략합니다.

#접근성

  • 사이드바는 <aside>이며, 링크는 레이블이 있는 <nav> 안에 배치합니다. 현재 페이지는 aria-current="page"로 표시합니다.
  • 작업 공간과 계정 버튼은 버튼과 링크가 들어 있는 메뉴를 엽니다. 두 메뉴는 일반 팝오버이며, Tab 키로 항목 사이를 이동하고 Escape 키로 닫습니다.
  • 이름 옆의 아바타는 장식이므로 alt 속성에 빈 값을 지정합니다.
  • 미터의 값은 텍스트로 제공하며, 옆의 레이블을 접근 가능한 이름으로 사용합니다.
  • 드로어는 <dialog>입니다. 열리면 포커스가 드로어 안으로 이동합니다. 닫기 버튼을 누르거나 드로어 바깥을 클릭하거나 Esc 키를 누르면 드로어가 닫히고 포커스가 메뉴 버튼으로 돌아갑니다.