Skip to content

App shell

The frame of a web app: a sidebar, a top bar and a content area that becomes a drawer layout on small screens.

App shell

AP

This week

42.8 km over 5 runs

Distance
42.8 km
Avg pace
5:12

Installation

Everything ships in one stylesheet. There is nothing to import per component.

<link rel="stylesheet" href="https://mian.ro/dist/mian.css">

Prefer to own the files? /r/app-shell.json is a registry item with this component's CSS and example markup, ready to copy into your project with any tool that reads the open registry-item format.

Class reference

Class / attributeDescription
mn-shellThe frame (usually the whole page).
mn-shell-sideThe sidebar (holds an mn-sidebar). Shown when the shell is at least 60rem wide.
mn-shell-body · mn-shell-top · mn-shell-mainContent column, sticky top bar, and main area.
mn-shell-menuThe top-bar button that opens the navigation drawer; hidden when the sidebar shows.
mn-shell-headPage title, description and actions at the top of the main area.

Accessibility

  • Use <aside> or <nav aria-label> for the sidebar, <header> for the top bar and <main> for content.
  • The drawer on small screens is a <dialog class="mn-drawer"> opened with data-mn-open, so focus is trapped and Escape closes it.
  • Mark the current page with aria-current="page" in the sidebar.
Choose a noodle

Minimal

Flat

Pixel

Linear

Thin

Glass

Textured

Bold

Elegant

Rounded

On this page