A single-column content container: centers and caps content width, applies responsive padding/gap, and optionally paints the surface background. It's the simplest of the library's three pane primitives — no split, no side panel, just a well-behaved wrapper.
SinglePane is a layout primitive, not a canonical M3 pattern
with its own spec page — it's the plumbing every other pane and every docs page in this
library is built on top of. This docs site dogfoods it directly: every /docs/** page (including this one) wraps its main snippet content in a bare <SinglePane>, relying on its default max-width and
padding instead of hand-rolling mx-auto max-w-* p-* classes per route.
Two width mechanisms stack: the outer wrapper always caps at max-w-7xl, and the centered prop optionally caps further (narrow → max-w-2xl, medium → max-w-5xl) for
prose-style content that reads better at a tighter measure.
import { SinglePane } from '@noxlovette/material'; See it live, with Controls, in Storybook rather than a hand-rolled preview here.
Playground
Open the SinglePane story and try the centered/padding/gap controls.
Wrap page-level content directly — no other configuration is required for the common case:
<script lang="ts">
import { SinglePane } from '@noxlovette/material';
</script>
<SinglePane centered="medium">
<h1>Page title</h1>
<p>Body content, capped at max-w-5xl and centered.</p>
</SinglePane> | Prop | Type | Default | Description |
|---|---|---|---|
children required | Snippet | — | Content rendered inside the pane. |
centered | "none" | "narrow" | "medium" | "none" | Caps the content width — narrow is max-w-2xl, medium is max-w-5xl — and centers it. Independent of the outer max-w-7xl wrapper. |
background | boolean | true | Whether to paint the surface background color on the root element. |
full | boolean | true | Whether the pane stretches to min-h-dvh, e.g. for a full-page layout. |
padding | "none" | "sm" | "md" | "lg" | "md" | Padding applied to the inner content container, responsive across breakpoints. |
gap | "none" | "sm" | "md" | "lg" | "xl" | "md" | Flex gap between direct children of the content container. |
rounded | boolean | true | Rounds the top corners on md+ breakpoints — matches the rounded treatment of sibling panes like SplitPane/SupportingPane. |
contentClass | string | — | Extra class applied to the inner content container (the max-width flex column). |
Plain structure
Renders two plain divs — no ARIA role is implied or needed; the semantics come entirely from the content you place inside.
Background contrast
When background is true, the root paints the surface color role, keeping contrast consistent with the active theme for any content placed inside.