應用程式框架是應用程式的外框,讓側邊欄在主區域捲動時留在原位。它以 shell 版面配置類別為基礎,處理 utility 無法表達的細節,包括以 dvh 設定高度、讓側邊欄黏附定位並獨立捲動、為主畫面指示器預留內距,以及設定側邊欄收起的寬度門檻。
框架本身只負責版面配置。範例以邊框 utility 畫出細線,導覽列使用 navbar,連結使用 nav,各區塊則使用排列在自動網格中的卡片。
應用程式框架
<div class="shell bg-surface-base fg-text-body text-sm"> <a class="skip" href="#app-main">Skip to content</a> <aside class="shell-sidebar gap-md p-sm bxe(1) bxe-solid b-line-hair"> <a class="navbar-brand h(40) px-xs" 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 4.3333A3.6667 3.6667 0 0 1 8 11.6667Z" fill="currentColor" stroke="none" /> </svg>Atlas </a> <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> <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> <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>Team </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> <button type="button" class="btn btn-quiet justify-start px-xs mt-auto"> <span class="avatar avatar-xs" aria-hidden="true"> <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="20" height="20"><span class="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </aside> <main class="shell-main" id="app-main" tabindex="-1"> <header class="navbar" style="--navbar-padding-x: 1.5rem"> <button type="button" class="btn btn-quiet btn-square btn-sm shell-toggle" commandfor="shell-nav" command="show-modal" aria-label="Open 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="M3 5.5L13 5.5" /><path d="M3 10.5L13 10.5" /> </svg> </button> <h1 class="heading heading-sm">Projects</h1> <div class="navbar-end"> <button type="button" class="btn btn-quiet btn-square btn-sm" aria-label="Search"> <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> </button> <button type="button" class="btn btn-primary btn-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"> <path d="M3 8L13 8" /><path d="M8 3L8 13" /> </svg>New project </button> </div> </header> <div class="p-lg"> <ul class="auto-grid"> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Atlas</h2> <p class="card-description">atlas.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Borealis</h2> <p class="card-description">borealis.app</p> <span class="badge badge-info badge-dot card-action">Building</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Cinder</h2> <p class="card-description">cinder.io</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Drift</h2> <p class="card-description">drift.so</p> <span class="badge badge-danger badge-dot card-action">Failed</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Ember</h2> <p class="card-description">ember.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Fathom</h2> <p class="card-description">fathom.app</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> </ul> </div> </main> <dialog class="dialog dialog-drawer dialog-drawer-start" id="shell-nav" closedby="any" aria-label="Navigation"> <div class="dialog-body flex flex-col gap-md"> <a class="navbar-brand h(40) px-xs" 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 4.3333A3.6667 3.6667 0 0 1 8 11.6667Z" fill="currentColor" stroke="none" /> </svg>Atlas </a> <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> <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> <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>Team </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> <button type="button" class="btn btn-quiet justify-start px-xs mt-auto"> <span class="avatar avatar-xs" aria-hidden="true"> <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="20" height="20"><span class="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </div> <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="shell-nav" 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 ContrastIcon from '@master/icons-react/native/16/soft/contrast'import HomeIcon from '@master/icons-react/native/16/soft/home'import GridIcon from '@master/icons-react/native/16/soft/grid'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 SlidersIcon from '@master/icons-react/native/16/soft/sliders'import MenuIcon from '@master/icons-react/native/16/soft/menu'import SearchIcon from '@master/icons-react/native/16/soft/search'import PlusIcon from '@master/icons-react/native/16/soft/plus'import XIcon from '@master/icons-react/native/16/soft/x'<div className="shell bg-surface-base fg-text-body text-sm"> <a className="skip" href="#app-main">Skip to content</a> <aside className="shell-sidebar gap-md p-sm bxe(1) bxe-solid b-line-hair"> <a className="navbar-brand h(40) px-xs" href="#"><ContrastIcon className="icon" />Atlas</a> <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> <a className="nav-item" href="#"><GlobeIcon className="icon" />Domains</a> <a className="nav-item" href="#"><ChartBarIcon className="icon" />Analytics</a> <a className="nav-item" href="#"><UsersIcon className="icon" />Team</a> <a className="nav-item" href="#"><SlidersIcon className="icon" />Settings</a> </nav> <button type="button" className="btn btn-quiet justify-start px-xs mt-auto"> <span className="avatar avatar-xs" aria-hidden="true"> <img className="avatar-image" src="/demo/people/yiching-lin.webp" alt="" width="20" height="20" /><span className="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </aside> <main className="shell-main" id="app-main" tabIndex={-1}> <header className="navbar" style={{ '--navbar-padding-x': '1.5rem' } as React.CSSProperties}> <button type="button" className="btn btn-quiet btn-square btn-sm shell-toggle" {...{ commandfor: 'shell-nav', command: 'show-modal' }} aria-label="Open navigation"> <MenuIcon className="icon" /> </button> <h1 className="heading heading-sm">Projects</h1> <div className="navbar-end"> <button type="button" className="btn btn-quiet btn-square btn-sm" aria-label="Search"> <SearchIcon className="icon" /> </button> <button type="button" className="btn btn-primary btn-sm"> <PlusIcon className="icon" />New project </button> </div> </header> <div className="p-lg"> <ul className="auto-grid"> <li> <article className="card"> <header className="card-header"> <h2 className="card-title">Atlas</h2> <p className="card-description">atlas.dev</p> <span className="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article className="card"> <header className="card-header"> <h2 className="card-title">Borealis</h2> <p className="card-description">borealis.app</p> <span className="badge badge-info badge-dot card-action">Building</span> </header> </article> </li> <li> <article className="card"> <header className="card-header"> <h2 className="card-title">Cinder</h2> <p className="card-description">cinder.io</p> <span className="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article className="card"> <header className="card-header"> <h2 className="card-title">Drift</h2> <p className="card-description">drift.so</p> <span className="badge badge-danger badge-dot card-action">Failed</span> </header> </article> </li> <li> <article className="card"> <header className="card-header"> <h2 className="card-title">Ember</h2> <p className="card-description">ember.dev</p> <span className="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article className="card"> <header className="card-header"> <h2 className="card-title">Fathom</h2> <p className="card-description">fathom.app</p> <span className="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> </ul> </div> </main> <dialog className="dialog dialog-drawer dialog-drawer-start" id="shell-nav" closedby="any" aria-label="Navigation"> <div className="dialog-body flex flex-col gap-md"> <a className="navbar-brand h(40) px-xs" href="#"><ContrastIcon className="icon" />Atlas</a> <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> <a className="nav-item" href="#"><GlobeIcon className="icon" />Domains</a> <a className="nav-item" href="#"><ChartBarIcon className="icon" />Analytics</a> <a className="nav-item" href="#"><UsersIcon className="icon" />Team</a> <a className="nav-item" href="#"><SlidersIcon className="icon" />Settings</a> </nav> <button type="button" className="btn btn-quiet justify-start px-xs mt-auto"> <span className="avatar avatar-xs" aria-hidden="true"> <img className="avatar-image" src="/demo/people/yiching-lin.webp" alt="" width="20" height="20" /><span className="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </div> <button type="button" className="btn btn-quiet btn-square btn-sm dialog-close" {...{ commandfor: 'shell-nav', command: 'close' }} aria-label="Close navigation"> <XIcon className="icon" /> </button> </dialog></div><script> import ContrastIcon from '@master/icons-svelte/native/16/soft/contrast' import HomeIcon from '@master/icons-svelte/native/16/soft/home' import GridIcon from '@master/icons-svelte/native/16/soft/grid' 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 SlidersIcon from '@master/icons-svelte/native/16/soft/sliders' import MenuIcon from '@master/icons-svelte/native/16/soft/menu' import SearchIcon from '@master/icons-svelte/native/16/soft/search' import PlusIcon from '@master/icons-svelte/native/16/soft/plus' import XIcon from '@master/icons-svelte/native/16/soft/x'</script><div class="shell bg-surface-base fg-text-body text-sm"> <a class="skip" href="#app-main">Skip to content</a> <aside class="shell-sidebar gap-md p-sm bxe(1) bxe-solid b-line-hair"> <a class="navbar-brand h(40) px-xs" href="#"><ContrastIcon class="icon" />Atlas</a> <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> <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a> <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a> <a class="nav-item" href="#"><UsersIcon class="icon" />Team</a> <a class="nav-item" href="#"><SlidersIcon class="icon" />Settings</a> </nav> <button type="button" class="btn btn-quiet justify-start px-xs mt-auto"> <span class="avatar avatar-xs" aria-hidden="true"> <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="20" height="20"><span class="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </aside> <main class="shell-main" id="app-main" tabindex="-1"> <header class="navbar" style="--navbar-padding-x: 1.5rem"> <button type="button" class="btn btn-quiet btn-square btn-sm shell-toggle" commandfor="shell-nav" command="show-modal" aria-label="Open navigation"> <MenuIcon class="icon" /> </button> <h1 class="heading heading-sm">Projects</h1> <div class="navbar-end"> <button type="button" class="btn btn-quiet btn-square btn-sm" aria-label="Search"> <SearchIcon class="icon" /> </button> <button type="button" class="btn btn-primary btn-sm"> <PlusIcon class="icon" />New project </button> </div> </header> <div class="p-lg"> <ul class="auto-grid"> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Atlas</h2> <p class="card-description">atlas.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Borealis</h2> <p class="card-description">borealis.app</p> <span class="badge badge-info badge-dot card-action">Building</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Cinder</h2> <p class="card-description">cinder.io</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Drift</h2> <p class="card-description">drift.so</p> <span class="badge badge-danger badge-dot card-action">Failed</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Ember</h2> <p class="card-description">ember.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Fathom</h2> <p class="card-description">fathom.app</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> </ul> </div> </main> <dialog class="dialog dialog-drawer dialog-drawer-start" id="shell-nav" closedby="any" aria-label="Navigation"> <div class="dialog-body flex flex-col gap-md"> <a class="navbar-brand h(40) px-xs" href="#"><ContrastIcon class="icon" />Atlas</a> <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> <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a> <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a> <a class="nav-item" href="#"><UsersIcon class="icon" />Team</a> <a class="nav-item" href="#"><SlidersIcon class="icon" />Settings</a> </nav> <button type="button" class="btn btn-quiet justify-start px-xs mt-auto"> <span class="avatar avatar-xs" aria-hidden="true"> <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="20" height="20"><span class="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </div> <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="shell-nav" command="close" aria-label="Close navigation"> <XIcon class="icon" /> </button> </dialog></div><script setup>import ContrastIcon from '@master/icons-vue/native/16/soft/contrast'import HomeIcon from '@master/icons-vue/native/16/soft/home'import GridIcon from '@master/icons-vue/native/16/soft/grid'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 SlidersIcon from '@master/icons-vue/native/16/soft/sliders'import MenuIcon from '@master/icons-vue/native/16/soft/menu'import SearchIcon from '@master/icons-vue/native/16/soft/search'import PlusIcon from '@master/icons-vue/native/16/soft/plus'import XIcon from '@master/icons-vue/native/16/soft/x'</script><template> <div class="shell bg-surface-base fg-text-body text-sm"> <a class="skip" href="#app-main">Skip to content</a> <aside class="shell-sidebar gap-md p-sm bxe(1) bxe-solid b-line-hair"> <a class="navbar-brand h(40) px-xs" href="#"><ContrastIcon class="icon" />Atlas</a> <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> <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a> <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a> <a class="nav-item" href="#"><UsersIcon class="icon" />Team</a> <a class="nav-item" href="#"><SlidersIcon class="icon" />Settings</a> </nav> <button type="button" class="btn btn-quiet justify-start px-xs mt-auto"> <span class="avatar avatar-xs" aria-hidden="true"> <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="20" height="20"><span class="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </aside> <main class="shell-main" id="app-main" tabindex="-1"> <header class="navbar" style="--navbar-padding-x: 1.5rem"> <button type="button" class="btn btn-quiet btn-square btn-sm shell-toggle" commandfor="shell-nav" command="show-modal" aria-label="Open navigation"> <MenuIcon class="icon" /> </button> <h1 class="heading heading-sm">Projects</h1> <div class="navbar-end"> <button type="button" class="btn btn-quiet btn-square btn-sm" aria-label="Search"> <SearchIcon class="icon" /> </button> <button type="button" class="btn btn-primary btn-sm"> <PlusIcon class="icon" />New project </button> </div> </header> <div class="p-lg"> <ul class="auto-grid"> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Atlas</h2> <p class="card-description">atlas.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Borealis</h2> <p class="card-description">borealis.app</p> <span class="badge badge-info badge-dot card-action">Building</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Cinder</h2> <p class="card-description">cinder.io</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Drift</h2> <p class="card-description">drift.so</p> <span class="badge badge-danger badge-dot card-action">Failed</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Ember</h2> <p class="card-description">ember.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Fathom</h2> <p class="card-description">fathom.app</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> </ul> </div> </main> <dialog class="dialog dialog-drawer dialog-drawer-start" id="shell-nav" closedby="any" aria-label="Navigation"> <div class="dialog-body flex flex-col gap-md"> <a class="navbar-brand h(40) px-xs" href="#"><ContrastIcon class="icon" />Atlas</a> <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> <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a> <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a> <a class="nav-item" href="#"><UsersIcon class="icon" />Team</a> <a class="nav-item" href="#"><SlidersIcon class="icon" />Settings</a> </nav> <button type="button" class="btn btn-quiet justify-start px-xs mt-auto"> <span class="avatar avatar-xs" aria-hidden="true"> <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="20" height="20"><span class="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </div> <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="shell-nav" command="close" aria-label="Close navigation"> <XIcon class="icon" /> </button> </dialog> </div></template>#版面配置做法
| 部位 | 類別 | 用途 |
|---|---|---|
| 外框 | shell | 至少與檢視區等高的網格,同時是名為 shell 的尺寸查詢容器 |
| 側邊欄 | shell-sidebar | 黏附於頁首下方,高度等於檢視區的剩餘空間,並可獨立捲動 |
| 主區域 | shell-main | 占用剩餘的那一欄,寬度不會超出該欄 |
| 切換控制項 | shell-toggle | 讓控制項只在側邊欄收起時顯示 |
預設由整份文件捲動。採用黏附定位的 navbar 仍可正常運作,連到標題的連結會跳到正確位置,瀏覽器也會在返回時還原捲動位置。
當框架寬度小於 48rem,側邊欄會從版面配置中移除,也不會自動出現替代介面。請將相同的導覽放進起始側的抽屜,再以帶有 shell-toggle 的按鈕開啟。抽屜使用原生 <dialog>,透過 commandfor 開啟,整個配置無須撰寫腳本。
寬度門檻以框架本身為準。因此無論螢幕多寬,只要框架所在的面板夠窄,側邊欄就會收起。
各邊緣彼此對齊。主區域中的導覽列將 --navbar-padding-x 設為 1.5rem,與下方內容的內距相同,因此標題和第一張卡片從同一條線開始。側邊欄以 p-sm 加上導覽項目本身的內距,讓每個圖示都內縮 1.25rem;品牌和帳號按鈕各自使用 px-xs,也從同一處開始。
#托盤底色
將框架設為托盤底色,並把主區域放在內縮 8px 的面板上。這樣看起來,側邊欄屬於外框,內容則置於框架之上。版面配置類別維持相同,只調整底色與面板樣式。
托盤底色
<div class="shell bg-surface-tray fg-text-body text-sm"> <a class="skip" href="#app-main-inset">Skip to content</a> <aside class="shell-sidebar gap-md p-sm"> <a class="navbar-brand h(40) px-xs" 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 4.3333A3.6667 3.6667 0 0 1 8 11.6667Z" fill="currentColor" stroke="none" /> </svg>Atlas </a> <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> <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> <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>Team </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> <button type="button" class="btn btn-quiet justify-start px-xs mt-auto"> <span class="avatar avatar-xs" aria-hidden="true"> <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="20" height="20"><span class="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </aside> <div class="shell-main flex flex-col p(8) pxs(0)@container(--3xl)"> <main class="sheet grow(1)" id="app-main-inset" tabindex="-1"> <header class="navbar" style="--navbar-color: var(--color-surface-raised); --navbar-padding-x: 1.5rem"> <button type="button" class="btn btn-quiet btn-square btn-sm shell-toggle" commandfor="shell-nav-inset" command="show-modal" aria-label="Open 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="M3 5.5L13 5.5" /><path d="M3 10.5L13 10.5" /> </svg> </button> <h1 class="heading heading-sm">Projects</h1> <div class="navbar-end"> <button type="button" class="btn btn-primary btn-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"> <path d="M3 8L13 8" /><path d="M8 3L8 13" /> </svg>New project </button> </div> </header> <div class="p-lg"> <ul class="auto-grid"> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Atlas</h2> <p class="card-description">atlas.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Borealis</h2> <p class="card-description">borealis.app</p> <span class="badge badge-info badge-dot card-action">Building</span> </header> </article> </li> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Cinder</h2> <p class="card-description">cinder.io</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Drift</h2> <p class="card-description">drift.so</p> <span class="badge badge-danger badge-dot card-action">Failed</span> </header> </article> </li> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Ember</h2> <p class="card-description">ember.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Fathom</h2> <p class="card-description">fathom.app</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> </ul> </div> </main> </div> <dialog class="dialog dialog-drawer dialog-drawer-start" id="shell-nav-inset" closedby="any" aria-label="Navigation"> <div class="dialog-body flex flex-col gap-md"> <a class="navbar-brand h(40) px-xs" 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 4.3333A3.6667 3.6667 0 0 1 8 11.6667Z" fill="currentColor" stroke="none" /> </svg>Atlas </a> <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> <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> <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>Team </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> <button type="button" class="btn btn-quiet justify-start px-xs mt-auto"> <span class="avatar avatar-xs" aria-hidden="true"> <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="20" height="20"><span class="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </div> <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="shell-nav-inset" 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 ContrastIcon from '@master/icons-react/native/16/soft/contrast'import HomeIcon from '@master/icons-react/native/16/soft/home'import GridIcon from '@master/icons-react/native/16/soft/grid'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 SlidersIcon from '@master/icons-react/native/16/soft/sliders'import MenuIcon from '@master/icons-react/native/16/soft/menu'import PlusIcon from '@master/icons-react/native/16/soft/plus'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="#app-main-inset">Skip to content</a> <aside className="shell-sidebar gap-md p-sm"> <a className="navbar-brand h(40) px-xs" href="#"><ContrastIcon className="icon" />Atlas</a> <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> <a className="nav-item" href="#"><GlobeIcon className="icon" />Domains</a> <a className="nav-item" href="#"><ChartBarIcon className="icon" />Analytics</a> <a className="nav-item" href="#"><UsersIcon className="icon" />Team</a> <a className="nav-item" href="#"><SlidersIcon className="icon" />Settings</a> </nav> <button type="button" className="btn btn-quiet justify-start px-xs mt-auto"> <span className="avatar avatar-xs" aria-hidden="true"> <img className="avatar-image" src="/demo/people/yiching-lin.webp" alt="" width="20" height="20" /><span className="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </aside> <div className="shell-main flex flex-col p(8) pxs(0)@container(--3xl)"> <main className="sheet grow(1)" id="app-main-inset" tabIndex={-1}> <header className="navbar" style={{ '--navbar-color': 'var(--color-surface-raised)', '--navbar-padding-x': '1.5rem' } as React.CSSProperties}> <button type="button" className="btn btn-quiet btn-square btn-sm shell-toggle" {...{ commandfor: 'shell-nav-inset', command: 'show-modal' }} aria-label="Open navigation"> <MenuIcon className="icon" /> </button> <h1 className="heading heading-sm">Projects</h1> <div className="navbar-end"> <button type="button" className="btn btn-primary btn-sm"> <PlusIcon className="icon" />New project </button> </div> </header> <div className="p-lg"> <ul className="auto-grid"> <li> <article className="card card-flat"> <header className="card-header"> <h2 className="card-title">Atlas</h2> <p className="card-description">atlas.dev</p> <span className="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article className="card card-flat"> <header className="card-header"> <h2 className="card-title">Borealis</h2> <p className="card-description">borealis.app</p> <span className="badge badge-info badge-dot card-action">Building</span> </header> </article> </li> <li> <article className="card card-flat"> <header className="card-header"> <h2 className="card-title">Cinder</h2> <p className="card-description">cinder.io</p> <span className="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article className="card card-flat"> <header className="card-header"> <h2 className="card-title">Drift</h2> <p className="card-description">drift.so</p> <span className="badge badge-danger badge-dot card-action">Failed</span> </header> </article> </li> <li> <article className="card card-flat"> <header className="card-header"> <h2 className="card-title">Ember</h2> <p className="card-description">ember.dev</p> <span className="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article className="card card-flat"> <header className="card-header"> <h2 className="card-title">Fathom</h2> <p className="card-description">fathom.app</p> <span className="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> </ul> </div> </main> </div> <dialog className="dialog dialog-drawer dialog-drawer-start" id="shell-nav-inset" closedby="any" aria-label="Navigation"> <div className="dialog-body flex flex-col gap-md"> <a className="navbar-brand h(40) px-xs" href="#"><ContrastIcon className="icon" />Atlas</a> <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> <a className="nav-item" href="#"><GlobeIcon className="icon" />Domains</a> <a className="nav-item" href="#"><ChartBarIcon className="icon" />Analytics</a> <a className="nav-item" href="#"><UsersIcon className="icon" />Team</a> <a className="nav-item" href="#"><SlidersIcon className="icon" />Settings</a> </nav> <button type="button" className="btn btn-quiet justify-start px-xs mt-auto"> <span className="avatar avatar-xs" aria-hidden="true"> <img className="avatar-image" src="/demo/people/yiching-lin.webp" alt="" width="20" height="20" /><span className="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </div> <button type="button" className="btn btn-quiet btn-square btn-sm dialog-close" {...{ commandfor: 'shell-nav-inset', command: 'close' }} aria-label="Close navigation"> <XIcon className="icon" /> </button> </dialog></div><script> import ContrastIcon from '@master/icons-svelte/native/16/soft/contrast' import HomeIcon from '@master/icons-svelte/native/16/soft/home' import GridIcon from '@master/icons-svelte/native/16/soft/grid' 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 SlidersIcon from '@master/icons-svelte/native/16/soft/sliders' import MenuIcon from '@master/icons-svelte/native/16/soft/menu' import PlusIcon from '@master/icons-svelte/native/16/soft/plus' 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="#app-main-inset">Skip to content</a> <aside class="shell-sidebar gap-md p-sm"> <a class="navbar-brand h(40) px-xs" href="#"><ContrastIcon class="icon" />Atlas</a> <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> <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a> <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a> <a class="nav-item" href="#"><UsersIcon class="icon" />Team</a> <a class="nav-item" href="#"><SlidersIcon class="icon" />Settings</a> </nav> <button type="button" class="btn btn-quiet justify-start px-xs mt-auto"> <span class="avatar avatar-xs" aria-hidden="true"> <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="20" height="20"><span class="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </aside> <div class="shell-main flex flex-col p(8) pxs(0)@container(--3xl)"> <main class="sheet grow(1)" id="app-main-inset" tabindex="-1"> <header class="navbar" style="--navbar-color: var(--color-surface-raised); --navbar-padding-x: 1.5rem"> <button type="button" class="btn btn-quiet btn-square btn-sm shell-toggle" commandfor="shell-nav-inset" command="show-modal" aria-label="Open navigation"> <MenuIcon class="icon" /> </button> <h1 class="heading heading-sm">Projects</h1> <div class="navbar-end"> <button type="button" class="btn btn-primary btn-sm"> <PlusIcon class="icon" />New project </button> </div> </header> <div class="p-lg"> <ul class="auto-grid"> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Atlas</h2> <p class="card-description">atlas.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Borealis</h2> <p class="card-description">borealis.app</p> <span class="badge badge-info badge-dot card-action">Building</span> </header> </article> </li> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Cinder</h2> <p class="card-description">cinder.io</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Drift</h2> <p class="card-description">drift.so</p> <span class="badge badge-danger badge-dot card-action">Failed</span> </header> </article> </li> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Ember</h2> <p class="card-description">ember.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Fathom</h2> <p class="card-description">fathom.app</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> </ul> </div> </main> </div> <dialog class="dialog dialog-drawer dialog-drawer-start" id="shell-nav-inset" closedby="any" aria-label="Navigation"> <div class="dialog-body flex flex-col gap-md"> <a class="navbar-brand h(40) px-xs" href="#"><ContrastIcon class="icon" />Atlas</a> <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> <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a> <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a> <a class="nav-item" href="#"><UsersIcon class="icon" />Team</a> <a class="nav-item" href="#"><SlidersIcon class="icon" />Settings</a> </nav> <button type="button" class="btn btn-quiet justify-start px-xs mt-auto"> <span class="avatar avatar-xs" aria-hidden="true"> <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="20" height="20"><span class="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </div> <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="shell-nav-inset" command="close" aria-label="Close navigation"> <XIcon class="icon" /> </button> </dialog></div><script setup>import ContrastIcon from '@master/icons-vue/native/16/soft/contrast'import HomeIcon from '@master/icons-vue/native/16/soft/home'import GridIcon from '@master/icons-vue/native/16/soft/grid'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 SlidersIcon from '@master/icons-vue/native/16/soft/sliders'import MenuIcon from '@master/icons-vue/native/16/soft/menu'import PlusIcon from '@master/icons-vue/native/16/soft/plus'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="#app-main-inset">Skip to content</a> <aside class="shell-sidebar gap-md p-sm"> <a class="navbar-brand h(40) px-xs" href="#"><ContrastIcon class="icon" />Atlas</a> <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> <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a> <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a> <a class="nav-item" href="#"><UsersIcon class="icon" />Team</a> <a class="nav-item" href="#"><SlidersIcon class="icon" />Settings</a> </nav> <button type="button" class="btn btn-quiet justify-start px-xs mt-auto"> <span class="avatar avatar-xs" aria-hidden="true"> <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="20" height="20"><span class="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </aside> <div class="shell-main flex flex-col p(8) pxs(0)@container(--3xl)"> <main class="sheet grow(1)" id="app-main-inset" tabindex="-1"> <header class="navbar" style="--navbar-color: var(--color-surface-raised); --navbar-padding-x: 1.5rem"> <button type="button" class="btn btn-quiet btn-square btn-sm shell-toggle" commandfor="shell-nav-inset" command="show-modal" aria-label="Open navigation"> <MenuIcon class="icon" /> </button> <h1 class="heading heading-sm">Projects</h1> <div class="navbar-end"> <button type="button" class="btn btn-primary btn-sm"> <PlusIcon class="icon" />New project </button> </div> </header> <div class="p-lg"> <ul class="auto-grid"> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Atlas</h2> <p class="card-description">atlas.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Borealis</h2> <p class="card-description">borealis.app</p> <span class="badge badge-info badge-dot card-action">Building</span> </header> </article> </li> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Cinder</h2> <p class="card-description">cinder.io</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Drift</h2> <p class="card-description">drift.so</p> <span class="badge badge-danger badge-dot card-action">Failed</span> </header> </article> </li> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Ember</h2> <p class="card-description">ember.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card card-flat"> <header class="card-header"> <h2 class="card-title">Fathom</h2> <p class="card-description">fathom.app</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> </ul> </div> </main> </div> <dialog class="dialog dialog-drawer dialog-drawer-start" id="shell-nav-inset" closedby="any" aria-label="Navigation"> <div class="dialog-body flex flex-col gap-md"> <a class="navbar-brand h(40) px-xs" href="#"><ContrastIcon class="icon" />Atlas</a> <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> <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a> <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a> <a class="nav-item" href="#"><UsersIcon class="icon" />Team</a> <a class="nav-item" href="#"><SlidersIcon class="icon" />Settings</a> </nav> <button type="button" class="btn btn-quiet justify-start px-xs mt-auto"> <span class="avatar avatar-xs" aria-hidden="true"> <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="20" height="20"><span class="avatar-fallback">YL</span> </span>Yi-ching Lin </button> </div> <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="shell-nav-inset" command="close" aria-label="Close navigation"> <XIcon class="icon" /> </button> </dialog> </div></template>導覽列的背景會帶有下方區域的色調。若導覽列位於面板上,請將 --navbar-color 設為該面板的色彩。
#含頁首
shell-header 位於框架上方,橫跨兩欄。側邊欄會黏附在頁首下方,框架透過 --shell-header 預留頁首高度。預設值為 3.5rem,與導覽列等高。若頁首較高,請調整此屬性。此處頁首的 --navbar-padding-x 為 1.25rem,讓品牌位於側邊欄圖示的正上方。
含頁首
<div class="shell bg-surface-base fg-text-body text-sm"> <a class="skip" href="#app-main-header">Skip to content</a> <header class="navbar shell-header bb(1) bb-solid b-line-hair" style="--navbar-padding-x: 1.25rem"> <button type="button" class="btn btn-quiet btn-square btn-sm shell-toggle" commandfor="shell-nav-header" command="show-modal" aria-label="Open 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="M3 5.5L13 5.5" /><path d="M3 10.5L13 10.5" /> </svg> </button> <a class="navbar-brand" 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 4.3333A3.6667 3.6667 0 0 1 8 11.6667Z" fill="currentColor" stroke="none" /> </svg>Atlas </a> <div class="navbar-end"> <button type="button" class="btn btn-quiet btn-square btn-sm" aria-label="Notifications"> <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.25 6C4.25 4.25 6 2.5 8 2.5C10 2.5 11.75 4.25 11.75 6V8.25C11.75 9.75 12.75 10.75 13.25 11.25Q13.5 11.75 12.75 11.75H3.25Q2.5 11.75 2.75 11.25C3.25 10.75 4.25 9.75 4.25 8.25Z" /><path d="M6.85 14Q8 15 9.15 14" /> </svg> </button> <button type="button" class="btn btn-quiet btn-square btn-sm mxe(-4)" aria-label="Account"> <span class="avatar avatar-sm" aria-hidden="true"> <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="24" height="24"><span class="avatar-fallback">YL</span> </span> </button> </div> </header> <div class="shell-sidebar p-sm bxe(1) bxe-solid b-line-hair"> <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> <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> <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>Team </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> <main class="shell-main flex flex-col gap-lg px(20) py-lg" id="app-main-header" tabindex="-1"> <h1 class="heading heading-lg">Projects</h1> <ul class="auto-grid"> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Atlas</h2> <p class="card-description">atlas.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Borealis</h2> <p class="card-description">borealis.app</p> <span class="badge badge-info badge-dot card-action">Building</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Cinder</h2> <p class="card-description">cinder.io</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Drift</h2> <p class="card-description">drift.so</p> <span class="badge badge-danger badge-dot card-action">Failed</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Ember</h2> <p class="card-description">ember.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Fathom</h2> <p class="card-description">fathom.app</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> </ul> </main> <dialog class="dialog dialog-drawer dialog-drawer-start" id="shell-nav-header" closedby="any" aria-label="Navigation"> <div class="dialog-body flex flex-col gap-md"> <a class="navbar-brand h(40) px-xs" 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 4.3333A3.6667 3.6667 0 0 1 8 11.6667Z" fill="currentColor" stroke="none" /> </svg>Atlas </a> <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> <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> <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>Team </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="shell-nav-header" 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 MenuIcon from '@master/icons-react/native/16/soft/menu'import ContrastIcon from '@master/icons-react/native/16/soft/contrast'import BellIcon from '@master/icons-react/native/16/soft/bell'import HomeIcon from '@master/icons-react/native/16/soft/home'import GridIcon from '@master/icons-react/native/16/soft/grid'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 SlidersIcon from '@master/icons-react/native/16/soft/sliders'import XIcon from '@master/icons-react/native/16/soft/x'<div className="shell bg-surface-base fg-text-body text-sm"> <a className="skip" href="#app-main-header">Skip to content</a> <header className="navbar shell-header bb(1) bb-solid b-line-hair" style={{ '--navbar-padding-x': '1.25rem' } as React.CSSProperties}> <button type="button" className="btn btn-quiet btn-square btn-sm shell-toggle" {...{ commandfor: 'shell-nav-header', command: 'show-modal' }} aria-label="Open navigation"> <MenuIcon className="icon" /> </button> <a className="navbar-brand" href="#"><ContrastIcon className="icon" />Atlas</a> <div className="navbar-end"> <button type="button" className="btn btn-quiet btn-square btn-sm" aria-label="Notifications"> <BellIcon className="icon" /> </button> <button type="button" className="btn btn-quiet btn-square btn-sm mxe(-4)" aria-label="Account"> <span className="avatar avatar-sm" aria-hidden="true"> <img className="avatar-image" src="/demo/people/yiching-lin.webp" alt="" width="24" height="24" /><span className="avatar-fallback">YL</span> </span> </button> </div> </header> <div className="shell-sidebar p-sm bxe(1) bxe-solid b-line-hair"> <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> <a className="nav-item" href="#"><GlobeIcon className="icon" />Domains</a> <a className="nav-item" href="#"><ChartBarIcon className="icon" />Analytics</a> <a className="nav-item" href="#"><UsersIcon className="icon" />Team</a> <a className="nav-item" href="#"><SlidersIcon className="icon" />Settings</a> </nav> </div> <main className="shell-main flex flex-col gap-lg px(20) py-lg" id="app-main-header" tabIndex={-1}> <h1 className="heading heading-lg">Projects</h1> <ul className="auto-grid"> <li> <article className="card"> <header className="card-header"> <h2 className="card-title">Atlas</h2> <p className="card-description">atlas.dev</p> <span className="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article className="card"> <header className="card-header"> <h2 className="card-title">Borealis</h2> <p className="card-description">borealis.app</p> <span className="badge badge-info badge-dot card-action">Building</span> </header> </article> </li> <li> <article className="card"> <header className="card-header"> <h2 className="card-title">Cinder</h2> <p className="card-description">cinder.io</p> <span className="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article className="card"> <header className="card-header"> <h2 className="card-title">Drift</h2> <p className="card-description">drift.so</p> <span className="badge badge-danger badge-dot card-action">Failed</span> </header> </article> </li> <li> <article className="card"> <header className="card-header"> <h2 className="card-title">Ember</h2> <p className="card-description">ember.dev</p> <span className="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article className="card"> <header className="card-header"> <h2 className="card-title">Fathom</h2> <p className="card-description">fathom.app</p> <span className="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> </ul> </main> <dialog className="dialog dialog-drawer dialog-drawer-start" id="shell-nav-header" closedby="any" aria-label="Navigation"> <div className="dialog-body flex flex-col gap-md"> <a className="navbar-brand h(40) px-xs" href="#"><ContrastIcon className="icon" />Atlas</a> <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> <a className="nav-item" href="#"><GlobeIcon className="icon" />Domains</a> <a className="nav-item" href="#"><ChartBarIcon className="icon" />Analytics</a> <a className="nav-item" href="#"><UsersIcon className="icon" />Team</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: 'shell-nav-header', command: 'close' }} aria-label="Close navigation"> <XIcon className="icon" /> </button> </dialog></div><script> import MenuIcon from '@master/icons-svelte/native/16/soft/menu' import ContrastIcon from '@master/icons-svelte/native/16/soft/contrast' import BellIcon from '@master/icons-svelte/native/16/soft/bell' import HomeIcon from '@master/icons-svelte/native/16/soft/home' import GridIcon from '@master/icons-svelte/native/16/soft/grid' 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 SlidersIcon from '@master/icons-svelte/native/16/soft/sliders' import XIcon from '@master/icons-svelte/native/16/soft/x'</script><div class="shell bg-surface-base fg-text-body text-sm"> <a class="skip" href="#app-main-header">Skip to content</a> <header class="navbar shell-header bb(1) bb-solid b-line-hair" style="--navbar-padding-x: 1.25rem"> <button type="button" class="btn btn-quiet btn-square btn-sm shell-toggle" commandfor="shell-nav-header" command="show-modal" aria-label="Open navigation"> <MenuIcon class="icon" /> </button> <a class="navbar-brand" href="#"><ContrastIcon class="icon" />Atlas</a> <div class="navbar-end"> <button type="button" class="btn btn-quiet btn-square btn-sm" aria-label="Notifications"> <BellIcon class="icon" /> </button> <button type="button" class="btn btn-quiet btn-square btn-sm mxe(-4)" aria-label="Account"> <span class="avatar avatar-sm" aria-hidden="true"> <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="24" height="24"><span class="avatar-fallback">YL</span> </span> </button> </div> </header> <div class="shell-sidebar p-sm bxe(1) bxe-solid b-line-hair"> <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> <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a> <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a> <a class="nav-item" href="#"><UsersIcon class="icon" />Team</a> <a class="nav-item" href="#"><SlidersIcon class="icon" />Settings</a> </nav> </div> <main class="shell-main flex flex-col gap-lg px(20) py-lg" id="app-main-header" tabindex="-1"> <h1 class="heading heading-lg">Projects</h1> <ul class="auto-grid"> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Atlas</h2> <p class="card-description">atlas.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Borealis</h2> <p class="card-description">borealis.app</p> <span class="badge badge-info badge-dot card-action">Building</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Cinder</h2> <p class="card-description">cinder.io</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Drift</h2> <p class="card-description">drift.so</p> <span class="badge badge-danger badge-dot card-action">Failed</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Ember</h2> <p class="card-description">ember.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Fathom</h2> <p class="card-description">fathom.app</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> </ul> </main> <dialog class="dialog dialog-drawer dialog-drawer-start" id="shell-nav-header" closedby="any" aria-label="Navigation"> <div class="dialog-body flex flex-col gap-md"> <a class="navbar-brand h(40) px-xs" href="#"><ContrastIcon class="icon" />Atlas</a> <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> <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a> <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a> <a class="nav-item" href="#"><UsersIcon class="icon" />Team</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="shell-nav-header" command="close" aria-label="Close navigation"> <XIcon class="icon" /> </button> </dialog></div><script setup>import MenuIcon from '@master/icons-vue/native/16/soft/menu'import ContrastIcon from '@master/icons-vue/native/16/soft/contrast'import BellIcon from '@master/icons-vue/native/16/soft/bell'import HomeIcon from '@master/icons-vue/native/16/soft/home'import GridIcon from '@master/icons-vue/native/16/soft/grid'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 SlidersIcon from '@master/icons-vue/native/16/soft/sliders'import XIcon from '@master/icons-vue/native/16/soft/x'</script><template> <div class="shell bg-surface-base fg-text-body text-sm"> <a class="skip" href="#app-main-header">Skip to content</a> <header class="navbar shell-header bb(1) bb-solid b-line-hair" style="--navbar-padding-x: 1.25rem"> <button type="button" class="btn btn-quiet btn-square btn-sm shell-toggle" commandfor="shell-nav-header" command="show-modal" aria-label="Open navigation"> <MenuIcon class="icon" /> </button> <a class="navbar-brand" href="#"><ContrastIcon class="icon" />Atlas</a> <div class="navbar-end"> <button type="button" class="btn btn-quiet btn-square btn-sm" aria-label="Notifications"> <BellIcon class="icon" /> </button> <button type="button" class="btn btn-quiet btn-square btn-sm mxe(-4)" aria-label="Account"> <span class="avatar avatar-sm" aria-hidden="true"> <img class="avatar-image" src="/demo/people/yiching-lin.webp" alt width="24" height="24"><span class="avatar-fallback">YL</span> </span> </button> </div> </header> <div class="shell-sidebar p-sm bxe(1) bxe-solid b-line-hair"> <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> <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a> <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a> <a class="nav-item" href="#"><UsersIcon class="icon" />Team</a> <a class="nav-item" href="#"><SlidersIcon class="icon" />Settings</a> </nav> </div> <main class="shell-main flex flex-col gap-lg px(20) py-lg" id="app-main-header" tabindex="-1"> <h1 class="heading heading-lg">Projects</h1> <ul class="auto-grid"> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Atlas</h2> <p class="card-description">atlas.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Borealis</h2> <p class="card-description">borealis.app</p> <span class="badge badge-info badge-dot card-action">Building</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Cinder</h2> <p class="card-description">cinder.io</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Drift</h2> <p class="card-description">drift.so</p> <span class="badge badge-danger badge-dot card-action">Failed</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Ember</h2> <p class="card-description">ember.dev</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> <li> <article class="card"> <header class="card-header"> <h2 class="card-title">Fathom</h2> <p class="card-description">fathom.app</p> <span class="badge badge-success badge-dot card-action">Ready</span> </header> </article> </li> </ul> </main> <dialog class="dialog dialog-drawer dialog-drawer-start" id="shell-nav-header" closedby="any" aria-label="Navigation"> <div class="dialog-body flex flex-col gap-md"> <a class="navbar-brand h(40) px-xs" href="#"><ContrastIcon class="icon" />Atlas</a> <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> <a class="nav-item" href="#"><GlobeIcon class="icon" />Domains</a> <a class="nav-item" href="#"><ChartBarIcon class="icon" />Analytics</a> <a class="nav-item" href="#"><UsersIcon class="icon" />Team</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="shell-nav-header" command="close" aria-label="Close navigation"> <XIcon class="icon" /> </button> </dialog> </div></template>#固定於檢視區
shell-fixed 讓框架恰好與檢視區等高。只有各區域會各自捲動,因此使用者瀏覽已開啟的內容時,清單會留在原位。收件匣、編輯器或聊天介面等需要並排瀏覽兩個區域的情境,適合使用這種配置。其餘情境請使用預設配置。在手機上,瀏覽器工具列會隨頁面捲動而收合,讓整份文件一起捲動能更好地配合這個行為。
--shell-sidebar 設定側邊欄寬度。此處的訊息清單使用 20rem。
這一欄由標題和清單組成,只有清單會捲動:清單使用 grow(1) min-h(0) overflow-y-auto,因此標題和篩選按鈕會留在原位。清單以 px-sm 與欄位兩側保持距離,讓目前所在列的面板不會貼齊邊緣;標題使用 pxs(10),也就是列本身的內縮 --list-inset,因此與各列文字從同一處開始。每一列都加上 items-baseline,讓時間與標題位於同一條基線上。
固定於檢視區
<div class="shell shell-fixed bg-surface-base fg-text-body text-sm" style="--shell-sidebar: 20rem"> <a class="skip" href="#app-main-fixed">Skip to content</a> <aside class="shell-sidebar bxe(1) bxe-solid b-line-hair" aria-labelledby="inbox-title"> <header class="flex items-center justify-between gap-xs shrink(0) h(56) px-sm"> <h1 class="heading heading-sm pxs(10)" id="inbox-title">Inbox</h1> <button type="button" class="btn btn-quiet btn-square btn-sm" aria-label="Filter messages"> <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.5365 3L11.4635 3A1 1 0 0 1 12.2548 4.6114L9.4587 8.2299A1 1 0 0 0 9.25 8.8413L9.25 11.323A1 1 0 0 1 8.6214 12.2514L7.875 12.55A0.8203 0.8203 0 0 1 6.75 11.7883L6.75 8.8413A1 1 0 0 0 6.5413 8.2299L3.7452 4.6114A1 1 0 0 1 4.5365 3Z" /> </svg> </button> </header> <ul class="list list-interactive grow(1) min-h(0) overflow-y-auto px-sm pt-2xs pb-sm"> <li> <a class="list-row items-baseline" href="#" aria-current="true"> <div class="list-body"> <p class="list-title">Deploy failed on drift.so</p> <p class="list-description">The install step exited with code 1.</p> </div> <time class="list-end" datetime="2026-11-12T09:41">09:41</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Misaki invited you to Borealis</p> <p class="list-description">You now have access as an editor.</p> </div> <time class="list-end" datetime="2026-11-12T09:12">09:12</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Your invoice for October</p> <p class="list-description">$48.00, paid with the card ending 4242.</p> </div> <time class="list-end" datetime="2026-11-10">Tue</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Domain atlas.dev renewed</p> <p class="list-description">Valid until 4 November next year.</p> </div> <time class="list-end" datetime="2026-11-09">Mon</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Weekly summary</p> <p class="list-description">1.28M requests, 0.02% errors.</p> </div> <time class="list-end" datetime="2026-11-09">Mon</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Cinder is live in 14 regions</p> <p class="list-description">Deployed from main by Po-han.</p> </div> <time class="list-end" datetime="2026-11-08">Sun</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">New sign-in from Tokyo</p> <p class="list-description">If this was you, there is nothing to do.</p> </div> <time class="list-end" datetime="2026-11-07">Sat</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Usage at 80% of your plan</p> <p class="list-description">Upgrade or lower traffic before the 30th.</p> </div> <time class="list-end" datetime="2026-11-06">Fri</time> </a> </li> </ul> </aside> <main class="shell-main" id="app-main-fixed" tabindex="-1"> <div class="flex flex-col items-start gap-lg max-w(688) p-lg"> <button type="button" class="btn btn-sm shell-toggle" commandfor="inbox-list" 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 3.3333L13.3333 3.3333" /><path d="M2.6667 6.3333L9.3333 6.3333" /><path d="M2.6667 9.3333L13.3333 9.3333" /><path d="M2.6667 12.3333L9.3333 12.3333" /> </svg>Inbox </button> <article class="flex flex-col gap-lg"> <header class="flex flex-col gap-xs"> <p class="eyebrow">Deployments</p> <h2 class="heading heading-xl">Deploy failed on drift.so</h2> <p class="lead lead-sm"> The install step exited with code 1. Nothing was published, and the previous deployment is still serving traffic. </p> </header> <pre class="code-block"><code>npm error code ERESOLVEnpm error ERESOLVE could not resolvenpm error While resolving: drift@2.4.0</code></pre> <div class="flex flex-col gap-sm"> <p class="m(0) leading-md"> The adapter that drift pins was withdrawn from the registry this morning, so the lockfile no longer resolves. Two other projects in this team pin the same version. </p> <p class="m(0) leading-md"> Retry the deployment after pinning the dependency, or roll back from the deployments list. The log above is the last three lines; the full log is on the deployment page. </p> </div> <div class="flex flex-wrap gap-xs"> <button type="button" class="btn btn-primary">Retry deployment</button> <button type="button" class="btn">View full log</button> </div> </article> </div> </main> <dialog class="dialog dialog-drawer dialog-drawer-start" id="inbox-list" closedby="any" aria-labelledby="inbox-drawer-title"> <header class="dialog-header"> <h2 class="dialog-title pxs(10)" id="inbox-drawer-title">Inbox</h2> </header> <div class="dialog-body"> <ul class="list list-interactive"> <li> <a class="list-row items-baseline" href="#" aria-current="true"> <div class="list-body"> <p class="list-title">Deploy failed on drift.so</p> <p class="list-description">The install step exited with code 1.</p> </div> <time class="list-end" datetime="2026-11-12T09:41">09:41</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Misaki invited you to Borealis</p> <p class="list-description">You now have access as an editor.</p> </div> <time class="list-end" datetime="2026-11-12T09:12">09:12</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Your invoice for October</p> <p class="list-description">$48.00, paid with the card ending 4242.</p> </div> <time class="list-end" datetime="2026-11-10">Tue</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Domain atlas.dev renewed</p> <p class="list-description">Valid until 4 November next year.</p> </div> <time class="list-end" datetime="2026-11-09">Mon</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Weekly summary</p> <p class="list-description">1.28M requests, 0.02% errors.</p> </div> <time class="list-end" datetime="2026-11-09">Mon</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Cinder is live in 14 regions</p> <p class="list-description">Deployed from main by Po-han.</p> </div> <time class="list-end" datetime="2026-11-08">Sun</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">New sign-in from Tokyo</p> <p class="list-description">If this was you, there is nothing to do.</p> </div> <time class="list-end" datetime="2026-11-07">Sat</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Usage at 80% of your plan</p> <p class="list-description">Upgrade or lower traffic before the 30th.</p> </div> <time class="list-end" datetime="2026-11-06">Fri</time> </a> </li> </ul> </div> <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="inbox-list" command="close" aria-label="Close the inbox"> <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><script> import FilterIcon from '@master/icons-svelte/native/16/soft/filter' import AlignLeftIcon from '@master/icons-svelte/native/16/soft/align-left' import XIcon from '@master/icons-svelte/native/16/soft/x'</script><div class="shell shell-fixed bg-surface-base fg-text-body text-sm" style="--shell-sidebar: 20rem"> <a class="skip" href="#app-main-fixed">Skip to content</a> <aside class="shell-sidebar bxe(1) bxe-solid b-line-hair" aria-labelledby="inbox-title"> <header class="flex items-center justify-between gap-xs shrink(0) h(56) px-sm"> <h1 class="heading heading-sm pxs(10)" id="inbox-title">Inbox</h1> <button type="button" class="btn btn-quiet btn-square btn-sm" aria-label="Filter messages"> <FilterIcon class="icon" /> </button> </header> <ul class="list list-interactive grow(1) min-h(0) overflow-y-auto px-sm pt-2xs pb-sm"> <li> <a class="list-row items-baseline" href="#" aria-current="true"> <div class="list-body"> <p class="list-title">Deploy failed on drift.so</p> <p class="list-description">The install step exited with code 1.</p> </div> <time class="list-end" datetime="2026-11-12T09:41">09:41</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Misaki invited you to Borealis</p> <p class="list-description">You now have access as an editor.</p> </div> <time class="list-end" datetime="2026-11-12T09:12">09:12</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Your invoice for October</p> <p class="list-description">$48.00, paid with the card ending 4242.</p> </div> <time class="list-end" datetime="2026-11-10">Tue</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Domain atlas.dev renewed</p> <p class="list-description">Valid until 4 November next year.</p> </div> <time class="list-end" datetime="2026-11-09">Mon</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Weekly summary</p> <p class="list-description">1.28M requests, 0.02% errors.</p> </div> <time class="list-end" datetime="2026-11-09">Mon</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Cinder is live in 14 regions</p> <p class="list-description">Deployed from main by Po-han.</p> </div> <time class="list-end" datetime="2026-11-08">Sun</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">New sign-in from Tokyo</p> <p class="list-description">If this was you, there is nothing to do.</p> </div> <time class="list-end" datetime="2026-11-07">Sat</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Usage at 80% of your plan</p> <p class="list-description">Upgrade or lower traffic before the 30th.</p> </div> <time class="list-end" datetime="2026-11-06">Fri</time> </a> </li> </ul> </aside> <main class="shell-main" id="app-main-fixed" tabindex="-1"> <div class="flex flex-col items-start gap-lg max-w(688) p-lg"> <button type="button" class="btn btn-sm shell-toggle" commandfor="inbox-list" command="show-modal"> <AlignLeftIcon class="icon" />Inbox </button> <article class="flex flex-col gap-lg"> <header class="flex flex-col gap-xs"> <p class="eyebrow">Deployments</p> <h2 class="heading heading-xl">Deploy failed on drift.so</h2> <p class="lead lead-sm"> The install step exited with code 1. Nothing was published, and the previous deployment is still serving traffic. </p> </header> <pre class="code-block"><code>npm error code ERESOLVEnpm error ERESOLVE could not resolvenpm error While resolving: drift@2.4.0</code></pre> <div class="flex flex-col gap-sm"> <p class="m(0) leading-md"> The adapter that drift pins was withdrawn from the registry this morning, so the lockfile no longer resolves. Two other projects in this team pin the same version. </p> <p class="m(0) leading-md"> Retry the deployment after pinning the dependency, or roll back from the deployments list. The log above is the last three lines; the full log is on the deployment page. </p> </div> <div class="flex flex-wrap gap-xs"> <button type="button" class="btn btn-primary">Retry deployment</button> <button type="button" class="btn">View full log</button> </div> </article> </div> </main> <dialog class="dialog dialog-drawer dialog-drawer-start" id="inbox-list" closedby="any" aria-labelledby="inbox-drawer-title"> <header class="dialog-header"> <h2 class="dialog-title pxs(10)" id="inbox-drawer-title">Inbox</h2> </header> <div class="dialog-body"> <ul class="list list-interactive"> <li> <a class="list-row items-baseline" href="#" aria-current="true"> <div class="list-body"> <p class="list-title">Deploy failed on drift.so</p> <p class="list-description">The install step exited with code 1.</p> </div> <time class="list-end" datetime="2026-11-12T09:41">09:41</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Misaki invited you to Borealis</p> <p class="list-description">You now have access as an editor.</p> </div> <time class="list-end" datetime="2026-11-12T09:12">09:12</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Your invoice for October</p> <p class="list-description">$48.00, paid with the card ending 4242.</p> </div> <time class="list-end" datetime="2026-11-10">Tue</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Domain atlas.dev renewed</p> <p class="list-description">Valid until 4 November next year.</p> </div> <time class="list-end" datetime="2026-11-09">Mon</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Weekly summary</p> <p class="list-description">1.28M requests, 0.02% errors.</p> </div> <time class="list-end" datetime="2026-11-09">Mon</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Cinder is live in 14 regions</p> <p class="list-description">Deployed from main by Po-han.</p> </div> <time class="list-end" datetime="2026-11-08">Sun</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">New sign-in from Tokyo</p> <p class="list-description">If this was you, there is nothing to do.</p> </div> <time class="list-end" datetime="2026-11-07">Sat</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Usage at 80% of your plan</p> <p class="list-description">Upgrade or lower traffic before the 30th.</p> </div> <time class="list-end" datetime="2026-11-06">Fri</time> </a> </li> </ul> </div> <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="inbox-list" command="close" aria-label="Close the inbox"> <XIcon class="icon" /> </button> </dialog></div><script setup>import FilterIcon from '@master/icons-vue/native/16/soft/filter'import AlignLeftIcon from '@master/icons-vue/native/16/soft/align-left'import XIcon from '@master/icons-vue/native/16/soft/x'</script><template> <div class="shell shell-fixed bg-surface-base fg-text-body text-sm" style="--shell-sidebar: 20rem"> <a class="skip" href="#app-main-fixed">Skip to content</a> <aside class="shell-sidebar bxe(1) bxe-solid b-line-hair" aria-labelledby="inbox-title"> <header class="flex items-center justify-between gap-xs shrink(0) h(56) px-sm"> <h1 class="heading heading-sm pxs(10)" id="inbox-title">Inbox</h1> <button type="button" class="btn btn-quiet btn-square btn-sm" aria-label="Filter messages"> <FilterIcon class="icon" /> </button> </header> <ul class="list list-interactive grow(1) min-h(0) overflow-y-auto px-sm pt-2xs pb-sm"> <li> <a class="list-row items-baseline" href="#" aria-current="true"> <div class="list-body"> <p class="list-title">Deploy failed on drift.so</p> <p class="list-description">The install step exited with code 1.</p> </div> <time class="list-end" datetime="2026-11-12T09:41">09:41</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Misaki invited you to Borealis</p> <p class="list-description">You now have access as an editor.</p> </div> <time class="list-end" datetime="2026-11-12T09:12">09:12</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Your invoice for October</p> <p class="list-description">$48.00, paid with the card ending 4242.</p> </div> <time class="list-end" datetime="2026-11-10">Tue</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Domain atlas.dev renewed</p> <p class="list-description">Valid until 4 November next year.</p> </div> <time class="list-end" datetime="2026-11-09">Mon</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Weekly summary</p> <p class="list-description">1.28M requests, 0.02% errors.</p> </div> <time class="list-end" datetime="2026-11-09">Mon</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Cinder is live in 14 regions</p> <p class="list-description">Deployed from main by Po-han.</p> </div> <time class="list-end" datetime="2026-11-08">Sun</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">New sign-in from Tokyo</p> <p class="list-description">If this was you, there is nothing to do.</p> </div> <time class="list-end" datetime="2026-11-07">Sat</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Usage at 80% of your plan</p> <p class="list-description">Upgrade or lower traffic before the 30th.</p> </div> <time class="list-end" datetime="2026-11-06">Fri</time> </a> </li> </ul> </aside> <main class="shell-main" id="app-main-fixed" tabindex="-1"> <div class="flex flex-col items-start gap-lg max-w(688) p-lg"> <button type="button" class="btn btn-sm shell-toggle" commandfor="inbox-list" command="show-modal"> <AlignLeftIcon class="icon" />Inbox </button> <article class="flex flex-col gap-lg"> <header class="flex flex-col gap-xs"> <p class="eyebrow">Deployments</p> <h2 class="heading heading-xl">Deploy failed on drift.so</h2> <p class="lead lead-sm"> The install step exited with code 1. Nothing was published, and the previous deployment is still serving traffic. </p> </header> <pre class="code-block"><code>npm error code ERESOLVEnpm error ERESOLVE could not resolvenpm error While resolving: drift@2.4.0</code></pre> <div class="flex flex-col gap-sm"> <p class="m(0) leading-md"> The adapter that drift pins was withdrawn from the registry this morning, so the lockfile no longer resolves. Two other projects in this team pin the same version. </p> <p class="m(0) leading-md"> Retry the deployment after pinning the dependency, or roll back from the deployments list. The log above is the last three lines; the full log is on the deployment page. </p> </div> <div class="flex flex-wrap gap-xs"> <button type="button" class="btn btn-primary">Retry deployment</button> <button type="button" class="btn">View full log</button> </div> </article> </div> </main> <dialog class="dialog dialog-drawer dialog-drawer-start" id="inbox-list" closedby="any" aria-labelledby="inbox-drawer-title"> <header class="dialog-header"> <h2 class="dialog-title pxs(10)" id="inbox-drawer-title">Inbox</h2> </header> <div class="dialog-body"> <ul class="list list-interactive"> <li> <a class="list-row items-baseline" href="#" aria-current="true"> <div class="list-body"> <p class="list-title">Deploy failed on drift.so</p> <p class="list-description">The install step exited with code 1.</p> </div> <time class="list-end" datetime="2026-11-12T09:41">09:41</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Misaki invited you to Borealis</p> <p class="list-description">You now have access as an editor.</p> </div> <time class="list-end" datetime="2026-11-12T09:12">09:12</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Your invoice for October</p> <p class="list-description">$48.00, paid with the card ending 4242.</p> </div> <time class="list-end" datetime="2026-11-10">Tue</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Domain atlas.dev renewed</p> <p class="list-description">Valid until 4 November next year.</p> </div> <time class="list-end" datetime="2026-11-09">Mon</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Weekly summary</p> <p class="list-description">1.28M requests, 0.02% errors.</p> </div> <time class="list-end" datetime="2026-11-09">Mon</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Cinder is live in 14 regions</p> <p class="list-description">Deployed from main by Po-han.</p> </div> <time class="list-end" datetime="2026-11-08">Sun</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">New sign-in from Tokyo</p> <p class="list-description">If this was you, there is nothing to do.</p> </div> <time class="list-end" datetime="2026-11-07">Sat</time> </a> </li> <li> <a class="list-row items-baseline" href="#"> <div class="list-body"> <p class="list-title">Usage at 80% of your plan</p> <p class="list-description">Upgrade or lower traffic before the 30th.</p> </div> <time class="list-end" datetime="2026-11-06">Fri</time> </a> </li> </ul> </div> <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="inbox-list" command="close" aria-label="Close the inbox"> <XIcon class="icon" /> </button> </dialog> </div></template>#工作區
工作區是多了第三個區域的固定式框架:編輯器位於通往它的導覽,以及編輯對象的屬性之間。讀者會長時間處理同一件事,而且它的設定應該留在一旁時,例如文章、版本說明或一筆紀錄,就適合使用這種配置。如果工作旁邊沒有需要設定的東西,上方的固定式框架就夠用了。
屬性放在 shell-aside 中,這裡用 --shell-aside 將它設為 18rem 寬。主區域由標頭和下方的編輯器組成,編輯器的引擎是 Tiptap,與富文字指南相同。
工作區
<div class="shell shell-fixed bg-surface-base fg-text-body text-sm" style="--shell-aside: 18rem" data-example="workspace"> <a class="skip" href="#workspace-main">Skip to content</a> <aside class="shell-sidebar gap-md p-sm bxe(1) bxe-solid b-line-hair" aria-label="Workspace"> <a class="navbar-brand h(40) px-xs" 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 4.3333A3.6667 3.6667 0 0 1 8 11.6667Z" fill="currentColor" stroke="none" /> </svg>Atlas</a> <nav class="nav" aria-label="Sections"> <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"> <path d="M4.5 2L9.0858 2A1 1 0 0 1 9.7929 2.2929L12.2071 4.7071A1 1 0 0 1 12.5 5.4142L12.5 13A1 1 0 0 1 11.5 14L4.5 14A1 1 0 0 1 3.5 13L3.5 3A1 1 0 0 1 4.5 2Z" /> <path d="M10 2.5V4.4A0.1 0.1 0 0 0 10.1 4.5H12L12.2409 4.7427A0.9993 0.9993 0 0 1 12.5 5.4142V5.5H10.1Q9.6444 5.5 9.3222 5.1778Q9 4.8556 9 4.4V2A1.1002 1.1002 0 0 1 9.3761 2.0431A1.0001 1.0001 0 0 1 9.7929 2.2929L10 2.5Z" fill="currentColor" stroke="none" fill-rule="evenodd" /> <path d="M6 10.5L10 10.5" /> </svg>Changelog <span class="nav-end">8</span> </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="M3 12.3333V3.6667Q3 2 4.6667 2H12.6Q13 2 13 2.4V13.6Q13 14 12.6 14H4.6667Q3 14 3 12.3333Z" /> <path d="M3 12.3333Q3 10.6667 4.6667 10.6667H13" /> </svg>Guides</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="2.6667" width="12" height="10.6667" rx="1" /> <path d="M5.3356 13.3334H4.1667A0.5 0.5 0 0 1 4.293 13.0011L9.4854 7.1596Q9.6862 6.9338 9.9881 6.925Q10.29 6.9162 10.5036 7.1298L14 10.6262V11.8333A0.5006 0.5006 0 0 1 13.6465 11.6869L10.0214 8.0618L5.3356 13.3334Z" fill="currentColor" stroke="none" fill-rule="evenodd" /> <circle cx="5" cy="5.6667" r="0.9" fill="currentColor" stroke="none" /> </svg>Media</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"> <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>Team</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> </aside> <main class="shell-main flex flex-col" id="workspace-main" tabindex="-1"> <header class="flex items-center gap-xs shrink(0) min-h(56) px-lg"> <button type="button" class="btn btn-quiet btn-square btn-sm btn-hang-start shell-toggle" commandfor="workspace-navigation" command="show-modal" aria-label="Open 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="M3 5.5L13 5.5" /> <path d="M3 10.5L13 10.5" /> </svg> </button> <h1 class="heading heading-sm min-w(0) truncate" id="workspace-title" data-title>Regions, closer to your readers</h1> <span class="badge badge-dot shrink(0) hidden@container(--max-sm)" data-status>Draft</span> <button type="button" class="btn btn-sm shrink(0) ml-auto hidden@container(--5xl)" commandfor="workspace-properties-drawer" command="show-modal" aria-label="Properties" data-properties-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"> <rect x="2" y="2.6667" width="12" height="10.6667" rx="1" /> <path d="M10 2.6667L10 13.3333" /> </svg> <span class="hidden@container(--max-sm)">Properties</span> </button> </header> <div class="flex flex-col grow(1) min-h(0) px-lg pb-lg"> <div class="editor grow(1) min-h(0)" style="--editor-rows: 3; --editor-max-rows: infinity"> <div class="toolbar editor-toolbar" role="toolbar" aria-label="Formatting" aria-controls="workspace-document"> <select class="select select-sm" data-command="style" aria-label="Text style"> <option value="paragraph">Paragraph</option> <option value="heading">Heading</option> <option value="subheading">Subheading</option> </select> <span class="toolbar-separator" role="separator" aria-orientation="vertical"></span> <button type="button" class="btn btn-quiet btn-sm btn-square" data-command="bold" aria-label="Bold" aria-keyshortcuts="Control+B Meta+B" aria-pressed="false"> <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.6667 3H8.3333C12.3333 3 12.3333 7.6667 8.3333 7.6667H4.6667M4.6667 3V13H9C13.3333 13 13.3333 7.6667 9 7.6667" /> </svg> </button> <button type="button" class="btn btn-quiet btn-sm btn-square" data-command="italic" aria-label="Italic" aria-keyshortcuts="Control+I Meta+I" aria-pressed="false"> <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 3L12.6667 3" /> <path d="M3.3333 13L9.3333 13" /> <path d="M9.6667 3L6.3333 13" stroke-linecap="butt" /> </svg> </button> <button type="button" class="btn btn-quiet btn-sm btn-square" data-command="underline" aria-label="Underline" aria-keyshortcuts="Control+U Meta+U" aria-pressed="false"> <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.3333 2.6667V7.6667C4.3333 12.3333 11.6667 12.3333 11.6667 7.6667V2.6667" /> <path d="M3 14L13 14" /> </svg> </button> <span class="toolbar-separator" role="separator" aria-orientation="vertical"></span> <button type="button" class="btn btn-quiet btn-sm btn-square" data-command="bulletList" aria-label="Bulleted list" aria-pressed="false"> <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" cy="4" r="0.5" fill="currentColor" stroke="none" /> <path d="M6 4L13.5 4" /> <circle cx="3" cy="8" r="0.5" fill="currentColor" stroke="none" /> <path d="M6 8L13.5 8" /> <circle cx="3" cy="12" r="0.5" fill="currentColor" stroke="none" /> <path d="M6 12L13.5 12" /> </svg> </button> <button type="button" class="btn btn-quiet btn-sm btn-square" data-command="orderedList" aria-label="Numbered list" aria-pressed="false"> <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 3.3333L3 2.6667V6M2 6H4" stroke-width="0.8" /> <path d="M2 9.6667C2 8.3333 4 8.3333 4 9.6667C4 10.6667 2 11 2 12.6667H4" stroke-width="0.8" /> <path d="M6.6667 4.6667L14 4.6667" /> <path d="M6.6667 11.3333L14 11.3333" /> </svg> </button> <button type="button" class="btn btn-quiet btn-sm btn-square" data-command="blockquote" aria-label="Quotation" aria-pressed="false"> <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.7667 3.3333H6.2333Q6.6667 3.3333 6.6667 3.7667V8.6667C6.6667 11.3333 4.6667 12.6667 2.3333 12.6667V10.6667C4 10.6667 4.3333 9.6667 4.3333 8H2.7667Q2.3333 8 2.3333 7.5667V3.7667Q2.3333 3.3333 2.7667 3.3333Z" /> <path d="M9.7667 3.3333H13.2333Q13.6667 3.3333 13.6667 3.7667V8.6667C13.6667 11.3333 11.6667 12.6667 9.3333 12.6667V10.6667C11 10.6667 11.3333 9.6667 11.3333 8H9.7667Q9.3333 8 9.3333 7.5667V3.7667Q9.3333 3.3333 9.7667 3.3333Z" /> </svg> </button> <button type="button" class="btn btn-quiet btn-sm btn-square ml-auto" data-command="undo" aria-label="Undo" aria-keyshortcuts="Control+Z Meta+Z"> <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 3L3.1414 5.8586A0.2 0.2 0 0 0 3.1414 6.1414L6 9" /> <path d="M2.715 6.4108A0.4996 0.4996 0 0 0 3 6.5H9.5A2.9999 2.9999 0 0 1 10.6043 12.2894Q10.0722 12.5 9.5 12.5L5.9755 12.5006A0.5 0.5 0 0 0 5.9266 13.4946L6 13.5H9.5A3.9999 3.9999 0 0 0 10.9724 5.7808Q10.263 5.5 9.5 5.5L2.9621 5.5014A0.5007 0.5007 0 0 0 2.715 5.5892A0.7044 0.7044 0 0 0 2.715 6.4108Z" fill="currentColor" stroke="none" fill-rule="evenodd" /> </svg> </button> <button type="button" class="btn btn-quiet btn-sm btn-square" data-command="redo" aria-label="Redo" aria-keyshortcuts="Control+Shift+Z Meta+Shift+Z"> <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 3L3.1414 5.8586A0.2 0.2 0 0 0 3.1414 6.1414L6 9" transform="translate(16 0) scale(-1 1)" /> <path d="M2.715 6.4108A0.4996 0.4996 0 0 0 3 6.5H9.5A2.9999 2.9999 0 0 1 10.6043 12.2894Q10.0722 12.5 9.5 12.5L5.9755 12.5006A0.5 0.5 0 0 0 5.9266 13.4946L6 13.5H9.5A3.9999 3.9999 0 0 0 10.9724 5.7808Q10.263 5.5 9.5 5.5L2.9621 5.5014A0.5007 0.5007 0 0 0 2.715 5.5892A0.7044 0.7044 0 0 0 2.715 6.4108Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="translate(16 0) scale(-1 1)" /> </svg> </button> </div> <div class="flex flex-col grow(1) min-h(0)" data-editor></div> </div> </div> </main> <aside class="shell-aside bxs(1) bxs-solid b-line-hair" aria-labelledby="workspace-properties-title"> <header class="flex items-center shrink(0) min-h(56) px(20)"> <h2 class="heading heading-sm" id="workspace-properties-title">Properties</h2> </header> <div class="px(20) pb(20)" data-properties-home> <div class="form" data-properties> <label class="field">Title <input class="input" type="text" name="title" value="Regions, closer to your readers" autocomplete="off"> </label> <label class="field">Status <select class="select" name="status"> <option class="select-option" value="draft">Draft</option> <option class="select-option" value="review">In review</option> <option class="select-option" value="published">Published</option> </select> </label> <div class="field"> <label for="ws-summary">Summary</label> <textarea class="input input-auto" id="ws-summary" name="summary" aria-describedby="ws-summary-hint">Four new regions, and a faster path to all of them.</textarea> <span class="field-hint" id="ws-summary-hint">Shown under the title in the changelog.</span> </div> <label class="check"> <input type="checkbox" role="switch" class="switch" name="listed" checked>List in the changelog</label> </div> </div> </aside> <dialog class="dialog dialog-drawer dialog-drawer-start" id="workspace-navigation" closedby="any" aria-label="Navigation"> <div class="dialog-body flex flex-col gap-md"> <a class="navbar-brand h(40) px-xs" 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 4.3333A3.6667 3.6667 0 0 1 8 11.6667Z" fill="currentColor" stroke="none" /> </svg>Atlas</a> <nav class="nav" aria-label="Sections, 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"> <path d="M4.5 2L9.0858 2A1 1 0 0 1 9.7929 2.2929L12.2071 4.7071A1 1 0 0 1 12.5 5.4142L12.5 13A1 1 0 0 1 11.5 14L4.5 14A1 1 0 0 1 3.5 13L3.5 3A1 1 0 0 1 4.5 2Z" /> <path d="M10 2.5V4.4A0.1 0.1 0 0 0 10.1 4.5H12L12.2409 4.7427A0.9993 0.9993 0 0 1 12.5 5.4142V5.5H10.1Q9.6444 5.5 9.3222 5.1778Q9 4.8556 9 4.4V2A1.1002 1.1002 0 0 1 9.3761 2.0431A1.0001 1.0001 0 0 1 9.7929 2.2929L10 2.5Z" fill="currentColor" stroke="none" fill-rule="evenodd" /> <path d="M6 10.5L10 10.5" /> </svg>Changelog <span class="nav-end">8</span> </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="M3 12.3333V3.6667Q3 2 4.6667 2H12.6Q13 2 13 2.4V13.6Q13 14 12.6 14H4.6667Q3 14 3 12.3333Z" /> <path d="M3 12.3333Q3 10.6667 4.6667 10.6667H13" /> </svg>Guides</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="2.6667" width="12" height="10.6667" rx="1" /> <path d="M5.3356 13.3334H4.1667A0.5 0.5 0 0 1 4.293 13.0011L9.4854 7.1596Q9.6862 6.9338 9.9881 6.925Q10.29 6.9162 10.5036 7.1298L14 10.6262V11.8333A0.5006 0.5006 0 0 1 13.6465 11.6869L10.0214 8.0618L5.3356 13.3334Z" fill="currentColor" stroke="none" fill-rule="evenodd" /> <circle cx="5" cy="5.6667" r="0.9" fill="currentColor" stroke="none" /> </svg>Media</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"> <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>Team</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="workspace-navigation" 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> <dialog class="dialog dialog-drawer" id="workspace-properties-drawer" closedby="any" aria-labelledby="workspace-properties-drawer-title"> <header class="dialog-header"> <h2 class="dialog-title" id="workspace-properties-drawer-title">Properties</h2> </header> <div class="dialog-body" data-properties-away></div> <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="workspace-properties-drawer" command="close" aria-label="Close properties"> <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 { Editor, Extension } from '@tiptap/core'import StarterKit from '@tiptap/starter-kit'import { toolbar } from '@master/ui/behaviors/toolbar.js'import { notes } from './content.js'/** * A heading writes the class of its level, so the editor styles it without selecting the element: Heading * itself renders no attribute for its level. */const headingClass = Extension.create({ name: 'headingClass', addGlobalAttributes() { return [{ types: ['heading'], attributes: { headingClass: { default: null, parseHTML: () => null, renderHTML: (attributes) => ({ class: attributes.level === 3 ? 'editor-subheading' : 'editor-heading' }), }, }, }] },})/** What the toolbar's buttons do, and how each asks whether it is on and whether it can run now. */const commands = { bold: { run: (chain) => chain.toggleBold(), active: 'bold' }, italic: { run: (chain) => chain.toggleItalic(), active: 'italic' }, underline: { run: (chain) => chain.toggleUnderline(), active: 'underline' }, bulletList: { run: (chain) => chain.toggleBulletList(), active: 'bulletList' }, orderedList: { run: (chain) => chain.toggleOrderedList(), active: 'orderedList' }, blockquote: { run: (chain) => chain.toggleBlockquote(), active: 'blockquote' }, undo: { run: (chain) => chain.undo() }, redo: { run: (chain) => chain.redo() },}/** The tone a status gives its badge in the header. */const tones = { draft: '', review: 'badge-info', published: 'badge-success' }/** * A workspace: one document in the main region, and one set of properties that stands in the aside while the * shell shows it and in a drawer while it does not. Tiptap owns the document; the controls own their values. * This module connects the toolbar, moves the properties when the shell crosses its threshold, and returns the * function that releases all of it. */export function mount(root) { const controller = new AbortController() const { signal } = controller const bar = root.querySelector('.editor-toolbar') const style = bar.querySelector('[data-command="style"]') const title = root.querySelector('[data-title]') const status = root.querySelector('[data-status]') const aside = root.querySelector('.shell-aside') const properties = root.querySelector('[data-properties]') const home = root.querySelector('[data-properties-home]') const away = root.querySelector('[data-properties-away]') const drawer = root.querySelector('#workspace-properties-drawer') const toggle = root.querySelector('[data-properties-toggle]') const navigation = root.querySelector('#workspace-navigation') const navigationToggle = root.querySelector('.shell-toggle') // The one editor of this document. It stays in the main region at every width, so nothing is ever copied. const editor = new Editor({ element: root.querySelector('[data-editor]'), content: notes, extensions: [ StarterKit.configure({ heading: { levels: [2, 3] }, paragraph: { HTMLAttributes: { class: 'editor-paragraph' } }, bulletList: { HTMLAttributes: { class: 'editor-list' } }, orderedList: { HTMLAttributes: { class: 'editor-list editor-list-numbered' } }, listItem: { HTMLAttributes: { class: 'editor-item' } }, blockquote: { HTMLAttributes: { class: 'editor-quote' } }, code: { HTMLAttributes: { class: 'code' } }, codeBlock: { HTMLAttributes: { class: 'code-block' } }, horizontalRule: { HTMLAttributes: { class: 'editor-rule' } }, link: { openOnClick: false, autolink: true, defaultProtocol: 'https', HTMLAttributes: { class: 'editor-link', rel: 'noopener noreferrer nofollow', target: null } }, }), headingClass, ], editorProps: { attributes: { id: 'workspace-document', class: 'editor-document', role: 'textbox', 'aria-multiline': 'true', 'aria-labelledby': 'workspace-title', }, }, }) const detachToolbar = toolbar(bar) /** Say what the selection holds and what can run now, on the toolbar. */ function sync() { for (const button of bar.querySelectorAll('button[data-command]')) { const command = commands[button.dataset.command] if (command.active) button.setAttribute('aria-pressed', String(editor.isActive(command.active))) // A tool that cannot run now says so and stays in the arrows' way: a disabled one is skipped by them, so // nobody using the keys would find Undo until there was something to undo. button.setAttribute('aria-disabled', String(!command.run(editor.can().chain()).run())) } style.value = editor.isActive('heading', { level: 2 }) ? 'heading' : editor.isActive('heading', { level: 3 }) ? 'subheading' : 'paragraph' } editor.on('transaction', sync) bar.addEventListener('click', (click) => { const command = commands[click.target.closest('button[data-command]')?.dataset.command] // Every tool hands focus back to the document, where the reader was writing. if (command) command.run(editor.chain().focus()).run() }, { signal }) style.addEventListener('change', () => { const chain = editor.chain().focus() if (style.value === 'paragraph') chain.setParagraph().run() else chain.setHeading({ level: style.value === 'heading' ? 2 : 3 }).run() }, { signal }) /** The header says what the properties hold: the title, and the status as a badge in its tone. */ const fields = { title: properties.querySelector('[name="title"]'), status: properties.querySelector('[name="status"]') } function describe() { title.textContent = fields.title.value.trim() || 'Untitled' status.textContent = fields.status.selectedOptions[0].textContent status.classList.remove(...Object.values(tones).filter(Boolean)) if (tones[fields.status.value]) status.classList.add(tones[fields.status.value]) } properties.addEventListener('input', describe, { signal }) /** * Put the properties where the shell has room for them: in the aside while it is displayed, in the drawer * while it is not. The same elements move, so every value, and with moveBefore() the focus, moves with them. */ function place() { const shown = getComputedStyle(aside).display !== 'none' const target = shown ? home : away if (properties.parentNode !== target) { const active = document.activeElement // Focus on a field stays on it; focus on the button that is about to leave goes to the first field. const focused = properties.contains(active) ? active : active === toggle ? fields.title : null // The aside is back: its drawer has nothing left to show. if (shown && drawer.open) drawer.close() if ('moveBefore' in target) target.moveBefore(properties, null) else target.append(properties) // What had focus keeps it beside the document; in a closed drawer it cannot, so its button takes it. if (focused) (shown ? focused : toggle).focus() } // The sidebar is back: the drawer that stood in for it closes. if (navigation.open && getComputedStyle(navigationToggle).display === 'none') navigation.close() } const observer = new ResizeObserver(place) observer.observe(root) sync() describe() return () => { controller.abort() observer.disconnect() detachToolbar() editor.destroy() for (const dialog of [drawer, navigation]) if (dialog.open) dialog.close() home.append(properties) }}/** * The document as Tiptap stores it: JSON, the data an application saves and loads. Nothing here is HTML, so * nothing a reader wrote is ever put into the page as markup. */const text = (value, ...marks) => ({ type: 'text', text: value, ...(marks.length ? { marks: marks.map((type) => ({ type })) } : {}) })const paragraph = (...content) => ({ type: 'paragraph', content: content.map((part) => typeof part === 'string' ? text(part) : part) })const heading = (level, value) => ({ type: 'heading', attrs: { level }, content: [text(value)] })const list = (type, ...items) => ({ type, content: items.map((item) => ({ type: 'listItem', content: [paragraph(item)] })) })export const notes = { type: 'doc', content: [ paragraph('Atlas now serves from ', text('eighteen regions', 'bold'), ', four more than last month. A request is answered by the region nearest the reader, and a deployment reaches all of them in under a minute.'), heading(2, 'What is new'), list('bulletList', 'São Paulo, Mumbai, Seoul and Johannesburg join the network.', 'A deployment is copied to every region at once, not one after another.', 'The dashboard draws latency by region, so a slow one is easy to find.', ), paragraph('Nothing has to change in a project. The new regions are on for every plan, and the next deployment uses them.'), heading(2, 'Choosing regions'), paragraph('Most projects should serve from everywhere. A project whose data must stay in one place can name the regions it runs in, from its settings or in its configuration file.'), list('orderedList', 'Open the project and choose Settings.', 'Under Regions, turn off Serve from every region.', 'Choose the regions to keep, then deploy.', ), { type: 'blockquote', content: [paragraph(text('A region that is turned off stops answering within a minute; requests go to the nearest one that is left.', 'italic'))] }, heading(2, 'What it costs'), paragraph('Requests are counted the same in every region, and the price of a request has not changed. Traffic between regions, which a deployment causes once, is not billed.'), heading(3, 'On the free plan'), paragraph('Free projects serve from every region too. The monthly allowance is shared across them, as before.'), heading(2, 'Known limits'), list('bulletList', 'Scheduled jobs still start from one region, the first in the project\'s list.', 'Logs from the new regions arrive a few seconds later than the others.', ), paragraph('Both are being worked on, and the status page says where each stands.'), ],}- 只有一個區域會捲動:文件。 主區域是
flex flex-col。它的標頭是shrink(0);編輯器及其外層的方框是grow(1) min-h(0),因此編輯器外框的高度恰好等於剩餘的空間。--editor-max-rows: infinity解除文件本身十八行的上限,高度因此取決於外框,editor-document則在其中捲動。主區域中沒有其他內容高過自己的方框,因此文件的捲軸旁不會出現第二條捲軸。 - 工具列留在原位,是因為它從不捲動。 它是編輯器外框頂端、位於文件上方的橫條,而不是捲動內容中的黏附列。外框較窄時,它會換到第二行。
- 框架小於 64rem 時,輔助欄會收起。 此時才會出現帶有
hidden@container(--5xl)的「Properties」按鈕,用來開啟靠在結尾側邊緣的抽屜dialog dialog-drawer。小於 24rem 時,按鈕只保留圖示,徽章則讓位給標題。小於 48rem 時,側邊欄也會收起,shell-toggle會在dialog-drawer-start中開啟導覽,與本頁的每個框架相同。 - 屬性只存在一份。 框架上的
ResizeObserver會檢查輔助欄是否顯示,並搬移這唯一的一組欄位:顯示時移入輔助欄,未顯示時移入抽屜。若用兩組欄位繫結同一份狀態,每個欄位就需要兩個 id,每次變更也都要複製一次;只用一組,每個標籤、id 和值都留在原處。瀏覽器支援時,搬移會使用moveBefore(),因此取得焦點的欄位會保有焦點;其他情況則使用append(),再由腳本交還焦點。欄位移入已關閉的抽屜時,焦點會移到「Properties」按鈕。 - 編輯器從不搬移,也從不複製。 它在任何寬度下都留在主區域,因此文件、選取範圍和歷史紀錄都在同一個地方。
- 導覽是重複的,不是搬移的。 連結不保存狀態,因此抽屜中有同一份清單,並使用自己的標籤。
標頭讀取的是同一組欄位:它的標題是 Title 欄位的值,徽章則是 Status。
#無障礙
- 使用地標元素。側邊欄用
<aside>或<nav>,主區域用<main>,頁首用<header>。為每個<nav>加上標籤。加入抽屜後會有兩個導覽區,請使用不同的標籤。 - 抽屜中的連結及其順序應與側邊欄相同。側邊欄顯示時,切換控制項會設為
display: none,並從 Tab 鍵的焦點順序中移除。 - 可獨立捲動的區域若沒有任何可取得焦點的內容,請為該區域加上
tabindex="0"和標籤,讓使用者能以鍵盤捲動。 - 在固定式框架中,這一欄是以
aria-labelledby由標題命名的<aside>,每個時間都是帶有程式可讀datetime的<time>。 - 在工作區中,兩個
<aside>元素都有名稱:側邊欄使用aria-label,屬性則以其標題命名。文件是以頁面標題命名的textbox,工具列是 Tab 順序中位於它之前的一個停駐點,屬性在原始碼中排在它之後,與閱讀順序相同。屬性的按鈕在aria-label中寫明「Properties」,因為在最窄的框架上,按鈕的文字會消失。 - 高度使用
dvh,因此手機的瀏覽器工具列不會蓋住側邊欄底部。側邊欄也會依主畫面指示器的安全區域預留底部內距。
#類別
| 類別 | 說明 |
|---|---|
shell | 外框採格線配置,至少與檢視區同高,同時也是名為 shell 的尺寸查詢容器。外框本身不繪製任何內容 |
shell-fixed | 外框尺寸與檢視區完全相同,各區域可獨立捲動,適用於收件匣、編輯器或聊天室搭配 shell 使用 |
shell-header | 橫跨外框頂端的頁首。黏附欄位的頂端以 --shell-header 為偏移量,從頁首下方開始 |
shell-sidebar | 起始側的欄採黏附定位,高度等於檢視區剩餘空間,並可獨立捲動。shell 容器寬度小於 48rem 時,此欄會從版面移除 |
shell-main | 主內容區占用剩餘的一欄,寬度不超過該欄 |
shell-aside | 尾端的輔助欄和側邊欄一樣採黏附定位。shell 容器寬度小於 64rem 時,此欄會從版面移除 |
shell-footer | 橫跨外框底部的頁尾,位於各欄下方、首屏之外 |
shell-toggle | 只在側邊欄隱藏時顯示的控制項,例如將同一組導覽開成抽屜面板的按鈕 |
#自訂屬性
| 屬性 | 預設值 | 說明 |
|---|---|---|
--shell-sidebar | 16rem | 側邊欄寬度 |
--shell-aside | 14rem | 輔助欄寬度 |
--shell-header | 3.5rem | 在黏附欄位上方為 shell-header 保留的空間,等於 navbar 的高度 |
#相關項目
- 導覽列位於頁面頂端的導覽列,頁面內容捲到它下方時才會顯示背景。
- 導覽清單適合側邊欄或設定頁面的直向導覽清單,目前所在的項目會微微浮起。
- 對話框以覆疊面板呈現的原生模態對話框,無須腳本即可開啟和關閉。
- 略過連結頁面上的第一個連結,取得焦點時才顯示,可略過導覽並跳到內容。
- 表面托盤、面板與凹槽構成所有元件共用的材質層次。
- 卡片帶有浮起效果的面板,各部分會依卡片可用空間調整。
- 清單將項目逐列排列,每列可放置媒體、文字和尾端內容。
- 自動網格在可用空間內排入最多等寬欄,由網格自行計算欄數。
- 編輯器富文字編輯器的外框:工具列、文件內容及兩者的狀態。
- 工具列小型凸起表面,容納一排低調的控制項。
- 表單讓列、區段和操作按鈕隨欄寬調整,維持一致的表單版面配置。
- 輸入欄位採內凹樣式的文字欄位,支援標籤、提示、錯誤訊息與群組。
- 下拉選單原生下拉選單,選項清單採用與介面一致的樣式。
- 開關珍珠色滑塊會滑到以介面前景色呈現的軌道上,適用於立即生效的設定。
- 徽章顯示狀態、類別或數量的小型膠囊標籤;只有在顏色具有意義時才使用色彩。
- 儀表板上方並列統計數字,下方以網格排列面板,無須媒體查詢即可自動重排。
- 文件網站導覽、行寬適合閱讀的文章,以及本頁目錄。
- 聖杯版面由頁首、三欄和頁尾組成,原始碼中以中間欄為三欄之首。
- 清單與詳細內容清單與所選項目的詳細內容並列,兩個窗格各自捲動。