Workspace

A workspace is the whole page

.workspace fills the window height (100dvh). Use it instead of the app shell (the app sidebar) for a single task, such as editing a theme. Its children are a <header> top bar (back button, <h1> task name, controls, and the primary button last), an <aside> side panel and a <main> work area. On this docs page the example box has a capped height. See the real thing: Open full page

Summer theme

The work area

A wide panel

The side panel is 20rem wide by default. data-panel="wide" makes it 24rem, for panels with forms or long lists.

Summer theme

The work area

An aside after the main is the end panel

An <aside> after the <main> is the end panel. It is as wide as the start panel, with its border on the other side. A workspace can have a start panel, an end panel or both, such as a page list on the left and a chat on the right.

Summer campaign

The work area

Only an end panel

The start panel is optional: a <main> followed by an <aside>, such as order details with a customer panel on the right.

Order #1042

3 items, total $148.00

Below 768px a button in the bar opens the panel

Give the side panel popover and an id. A button in the top bar whose popovertarget points to that id opens the panel over the work area. Press Esc or click outside to close it. The end panel opens from the right edge. From 768px up, panels are normal columns and the popovertarget buttons in the top bar hide themselves. No JS needed. Try narrowing the window on the examples above or on the full page.

Attributes

Attribute / element Values Description
.workspace Full-window layout (100dvh). Use it as a direct child of body
data-panel wide; none = 20rem (default) Makes the side panel 24rem wide
> header Full-width top bar that lays out its children in a row
header > h1 Task name. Pushes the buttons after it to the right. Truncated with … when too long
header [popovertarget] The panel's id Opens the panel on narrow screens. Hidden from 768px
> aside (before main) Start panel with a border on the right. Scrolls on its own
> main Work area. Scrolls on its own
> main ~ aside End panel with a border on the left. Opens from the right edge on narrow screens
aside[popover], id Below 768px the panel is hidden and opens as a popover over the work area (with a backdrop). From 768px it is a column. Add an aria-label to name the panel