Stable

Single Pane

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.

Overview

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 (narrowmax-w-2xl, mediummax-w-5xl) for prose-style content that reads better at a tighter measure.

Import

import { SinglePane } from '@noxlovette/material';

Live Demo

See it live, with Controls, in Storybook rather than a hand-rolled preview here.

widgets

Playground

Open the SinglePane story and try the centered/padding/gap controls.

Basic Usage

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>

SinglePane Props

PropTypeDefaultDescription
children required
SnippetContent 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
booleantrueWhether to paint the surface background color on the root element.
full
booleantrueWhether 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
booleantrueRounds the top corners on md+ breakpoints — matches the rounded treatment of sibling panes like SplitPane/SupportingPane.
contentClass
stringExtra class applied to the inner content container (the max-width flex column).

Accessibility

view_agenda

Plain structure

Renders two plain divs — no ARIA role is implied or needed; the semantics come entirely from the content you place inside.

contrast

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.