Workspaces
<div class="workspace">
<header>
<button type="button" class="btn md:hidden" data-variant="ghost" data-size="icon-sm" popovertarget="demo-workspace-panel" aria-label="Open the panel"><i class="icon icon-panel-left" aria-hidden="true"></i></button>
<a href="#" class="btn" data-variant="outline" data-size="icon-sm" aria-label="Back to themes"><i class="icon icon-arrow-left" data-rtl-flip aria-hidden="true"></i></a>
<h1>Summer Theme</h1>
<button type="button" class="btn ms-auto" data-variant="outline" data-size="sm">Preview</button>
<button type="button" class="btn" data-size="sm">Save</button>
</header>
<aside id="demo-workspace-panel" popover aria-label="Sections">
<nav class="flex flex-col p-2" aria-label="Sections">
<a href="#" class="btn justify-start" data-variant="ghost">Typography</a>
<a href="#" class="btn justify-start" data-variant="ghost">Navigation</a>
<a href="#" class="btn justify-start" data-variant="ghost">Homepage</a>
<a href="#" class="btn justify-start" data-variant="ghost">Footer</a>
</nav>
</aside>
<main class="bg-muted flex items-center justify-center p-6">
<p class="text-muted-foreground text-sm">The work area</p>
</main>
</div>
A workspace is the whole page
It fills the window, and the panel and the work area each scroll on their own. A page uses it in place of the app shell, for one job that needs the room.
<div class="workspace">
<header>The bar: back, title, controls, the primary action last</header>
<aside id="panel" popover>The panel</aside>
<main>The work area</main>
</div>
data-panel="wide" makes the panel 24rem wide, from 20rem
Open full pageSummer Theme
<div class="workspace" data-panel="wide">
<header>
<h1>Summer Theme</h1>
<button type="button" class="btn ms-auto" data-size="sm">Save</button>
</header>
<aside id="demo-workspace-wide-panel" popover aria-label="Settings">
<p class="text-muted-foreground p-4 text-sm">A panel 24rem wide</p>
</aside>
<main class="bg-muted"></main>
</div>
An aside after the main is the end panel
Open full pageSummer Campaign
<div class="workspace">
<header>
<button type="button" class="btn md:hidden" data-variant="ghost" data-size="icon-sm" popovertarget="demo-workspace-end-panel-start" aria-label="Open the pages"><i class="icon icon-panel-left" aria-hidden="true"></i></button>
<h1>Summer Campaign</h1>
<button type="button" class="btn ms-auto md:hidden" data-variant="ghost" data-size="icon-sm" popovertarget="demo-workspace-end-panel-end" aria-label="Open the chat"><i class="icon icon-panel-right" aria-hidden="true"></i></button>
</header>
<aside id="demo-workspace-end-panel-start" popover aria-label="Pages">
<p class="text-muted-foreground p-4 text-sm">The panel at the start</p>
</aside>
<main class="bg-muted"></main>
<aside id="demo-workspace-end-panel-end" popover aria-label="Chat">
<p class="text-muted-foreground p-4 text-sm">The end panel</p>
</aside>
</div>
An aside after the main is the end panel
It is as wide as the panel at the start, with its line on the other side. A workspace may have either panel or both.
<div class="workspace">
<header>The bar</header>
<aside id="panel" popover>The panel</aside>
<main>The work area</main>
<aside id="end-panel" popover>The end panel</aside>
</div>
Below 768px a button in the bar opens the panel
The panel carries popover and an id. A button with popovertarget opens it over the work area, and Escape or a press outside closes it. The end panel opens over the end of the window.
<button type="button" class="btn md:hidden" data-variant="ghost" data-size="icon-sm" popovertarget="panel" aria-label="Open the panel"><i class="icon icon-panel-left" aria-hidden="true"></i></button>