アプリシェルはアプリケーションの外枠です。メイン領域をスクロールしても、サイドバーは定位置に残ります。土台となる shell のレイアウトクラスは、ユーティリティだけでは記述できない部分を担います。具体的には、dvh を使った高さの指定、独立してスクロールする追従サイドバー、ホームインジケーター用の余白、サイドバーを非表示にする幅です。
シェル自体は何も描画しません。例では、細い罫線にはボーダーユーティリティ、バーにはナビゲーションバー、リンク群には 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 | サイドバーが非表示の間だけ表示する操作要素 |
既定では、ドキュメント全体がスクロールします。追従するナビゲーションバーはそのまま機能し、見出しへのリンクは適切な位置に移動します。前のページに戻ると、ブラウザーがスクロール位置を復元します。
シェルの幅が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を使うと、シェルはビューポートと同じ大きさになります。各領域だけが独立してスクロールするため、開いた項目を読み進めても一覧の位置は変わりません。受信トレイ、エディター、チャットなど、2つの領域を並べて使う画面に適しています。それ以外では既定のレイアウトを使います。スマートフォンではページのスクロールに合わせてブラウザーのツールバーがたたまれるため、ドキュメント全体がスクロールするほうが使いやすくなります。
--shell-sidebarでサイドバーの幅を指定します。この例ではメッセージ一覧に20remを確保しています。
このカラムは見出しと一覧からなり、スクロールするのは一覧だけです。一覧にgrow(1) min-h(0) overflow-y-autoを指定しているため、見出しとフィルターは動きません。一覧はカラムの内側にpx-smの余白を取るので、現在の行のシートが両端に接しません。見出しには行自体のインセット(--list-inset)と同じpxs(10)を指定し、行のテキストと同じ位置から始めます。各行は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>#ワークスペース
ワークスペースは、固定レイアウトのシェルに3つ目の領域を加えたものです。そこへ導いたナビゲーションと、編集中のもののプロパティとの間に、エディターを置きます。記事、リリースノート、レコードなど、利用者が1つのものに長い時間取り組み、その設定を横に表示しておきたい場合に使います。作業の横で設定するものがなければ、上の固定レイアウトで十分です。
プロパティは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.'), ],}- スクロールする領域は1つ、ドキュメントだけです。 メイン領域は
flex flex-colです。ヘッダーはshrink(0)、エディターとそれを囲むボックスはgrow(1) min-h(0)なので、エディターのフレームは残りの領域とちょうど同じ高さになります。--editor-max-rows: infinityでドキュメント自体の18行の上限を外すため、高さはフレームから決まり、editor-documentがその内側でスクロールします。メイン領域には、自身のボックスより高いものがほかにないため、ドキュメントのスクロールバーの横に2つ目のスクロールバーが現れることはありません。 - ツールバーは、スクロールしないから定位置に残ります。 ツールバーは、スクロールする領域の中のスティッキーなバーではなく、エディターのフレームの上端、ドキュメントの上にある帯です。フレームが狭いときは2行目に折り返します。
- シェルが64rem未満になると、補足領域がレイアウトから外れます。
hidden@container(--5xl)を指定した「Properties」ボタンはそのときだけ存在し、終了側の端に付くドロワー(dialog dialog-drawer)を開きます。24rem未満では、ボタンはグリフだけを残し、バッジはタイトルに場所を譲ります。48rem未満ではサイドバーもレイアウトから外れ、このページのほかのシェルと同じく、shell-toggleがナビゲーションをdialog-drawer-startで開きます。 - プロパティは1組だけです。 シェルに設定した
ResizeObserverが、補足領域が表示されているかを調べ、1組のフィールドを移動します。表示されている間は補足領域へ、表示されていない間はドロワーへ移します。1つの状態に結び付けた2組のフィールドでは、フィールドごとに2つのidと、変更のたびのコピーが必要になります。1組であれば、ラベル、id、値がそれぞれ1か所にとどまります。移動には、ブラウザーが対応していればmoveBefore()を使うため、フォーカスのあるフィールドはフォーカスを保ちます。対応していなければappend()を使い、その後でスクリプトがフォーカスを戻します。フィールドが閉じたドロワーへ移る場合は、フォーカスを「Properties」ボタンに移します。 - エディターは移動も複製もしません。 どの幅でもメイン領域にとどまるため、ドキュメント、選択範囲、履歴は1か所にあります。
- ナビゲーションは移動せず、繰り返します。 リンクは状態を持たないため、ドロワーには、独自のラベルを付けた同じリストを置きます。
ヘッダーも同じフィールドを読み取ります。タイトルは「Title」フィールドの値、バッジは「Status」の値です。
#アクセシビリティ
- ランドマークを使います。サイドバーには
<aside>または<nav>、メイン領域には<main>、ヘッダーには<header>を使います。それぞれの<nav>にラベルを付け、ドロワーも使う場合は、2つのラベルを区別できるようにします。 - ドロワーには、サイドバーと同じリンクを同じ順序で配置します。サイドバーの表示中は開閉ボタンが
display: noneになり、タブ順序から外れます。 - 独立してスクロールする領域にフォーカス可能な要素がない場合は、キーボードでスクロールできるように
tabindex="0"とラベルを付けます。 - 固定レイアウトでは、カラムは見出しを
aria-labelledbyで参照して名前を付けた<aside>です。各時刻は、プログラムが読み取れるdatetimeを持つ<time>です。 - ワークスペースでは、2つの
<aside>要素の両方に名前があります。サイドバーはaria-label、プロパティはその見出しで名前を付けます。ドキュメントは、ページのタイトルを名前とするtextboxです。ツールバーはその前にあり、タブ順序では1つの停止位置になります。プロパティは、読まれる順序のとおり、ソースでもドキュメントの後に続きます。プロパティのボタンは、最も狭いシェルでは文字が表示されなくなるため、aria-labelで「Properties」と伝えます。 - 高さには
dvhを使い、スマートフォンのツールバーがサイドバーの下端に重ならないようにします。サイドバーの下端には、ホームインジケーター用のセーフエリア分の余白も設けます。
#クラス
| クラス | 説明 |
|---|---|
shell | フレームは、少なくともビューポートと同じ高さのグリッドで、shell という名前のサイズコンテナーです。フレーム自体は何も描画しません。 |
shell-fixed | シェルはビューポートと同じ大きさになり、各領域が個別にスクロールします。受信トレイ、エディター、チャット向けです。shell と併用します |
shell-header | シェル上端の全幅にわたるヘッダーです。スティッキー配置の列は、シェル上端から --shell-header 分だけ下に配置されます。 |
shell-sidebar | 先頭側の列。スティッキー配置で、ビューポートの残りの高さを使い、独立してスクロールします。シェル幅が 48rem 未満になるとレイアウトから外れます。 |
shell-main | メイン領域。残りの列を占め、その列幅を超えません。 |
shell-aside | 末尾側の列です。サイドバーと同様にスティッキー配置され、シェル幅が 64rem 未満になるとレイアウトから外れます。 |
shell-footer | シェル下端の全幅にわたるフッターです。列の下にあり、初期表示範囲より下に位置します。 |
shell-toggle | サイドバーが表示されていないときだけ表示されるコントロールです。たとえば、サイドバーと同じナビゲーションをドロワーで開くボタンです。 |
#カスタムプロパティ
| プロパティ | 既定値 | 説明 |
|---|---|---|
--shell-sidebar | 16rem | サイドバーの幅 |
--shell-aside | 14rem | aside の幅 |
--shell-header | 3.5rem | スティッキー配置の列の上に shell-header 用として確保する高さです。ナビゲーションバーの高さに相当します。 |
#関連項目
- ナビゲーションバーページ上部にあり、スクロールでコンテンツがバーの下を通ると質感が現れるバー。
- ナビゲーションサイドバーや設定ページに表示する縦並びのリンク一覧。現在の項目は少し浮き上がって表示されます。
- ダイアログオーバーレイとして表示され、スクリプトなしで開閉できるネイティブのモーダルです。
- スキップリンクフォーカス時に表示され、ナビゲーションを飛ばせるページ先頭のリンク。
- サーフェストレイ、シート、ウェル。すべてのコンポーネントの土台となる、奥行きの異なる素材です。
- カード背景面から浮き上がり、割り当てられたスペースに合わせて内部のレイアウトが変わるシート。
- リスト画像やアイコン、テキスト、末尾の要素を並べた行の一覧。
- 自動グリッド収まる数だけ等幅のカラムを並べ、カラム数をグリッド自身が決めます。
- エディターリッチテキストエディターの枠組み。ツールバー、ドキュメント、それぞれの状態を扱います。
- ツールバー控えめなスタイルのコントロールを横一列に並べる、小さな浮き上がった面です。
- フォームフォームの幅に応じて行、セクション、操作ボタンを配置するレイアウト。
- 入力フィールド背景面より一段くぼんだテキスト入力フィールド。ラベル、ヒント、エラー、グループに対応します。
- セレクト選択肢リストもインターフェースと同じ質感で表示できるネイティブのセレクト。
- スイッチすぐに反映される設定向けの切り替えコントロールです。オンにすると、パール調のつまみがインク色のトラック上をスライドします。
- バッジステータス、カテゴリー、件数を示す小さなチップ。色に意味があるとき以外はニュートラルな色で表示します。
- ダッシュボード上段に指標を並べ、クエリーなしで組み替わるグリッドにパネルを配置。
- ドキュメントサイト内ナビゲーション、読みやすい行幅の本文、ページ内目次。
- ホーリーグレイルヘッダー、3カラム、フッターで構成し、ソースでは中央カラムを両側のカラムより先に配置。
- マスター・詳細一覧と選択項目の詳細を横に並べ、それぞれ独立してスクロール。