A content area paired with a fixed-width side panel — the canonical M3 supporting-pane
layout. This very page is built with it: the article content is the main snippet, and the "On this page" table of contents on
the right is the supporting snippet.
The SupportingPane component implements the Material Design 3 supporting-pane canonical layout: a primary content region alongside a narrower, fixed-width panel used for related but
secondary content — contextual actions, filters, or (as on this site) a table of contents.
Every docs page in this library, including this one, wraps its content in <SupportingPane anchor="viewport" position="right">, putting the article in main and a TableOfContents in supporting.
That's the anchor="viewport" mode: the panel fixes to the
true browser edge and scrolls independently, which is why the TOC stays put while you
scroll the article. See the Split Pane docs for the sibling
component's take on the same anchor-mode distinction.
import { SupportingPane } from '@noxlovette/material'; See it live, with Controls, in Storybook rather than a hand-rolled preview here. The
Storybook canvas demos anchor="parent" (sticky-within-a-box), since anchor="viewport" — the mode this
very page uses — only reads correctly on a real scrolling page like this one.
Playground
Open the SupportingPane story — includes Collapsible and Position Left variants.
The pattern used by every docs page in this library:
<script lang="ts">
import { SupportingPane } from '@noxlovette/material';
</script>
<SupportingPane anchor="viewport" position="right" rounded={false} gap="none">
{#snippet main()}
<article>...</article>
{/snippet}
{#snippet supporting()}
<aside>On this page...</aside>
{/snippet}
</SupportingPane> | Prop | Type | Default | Description |
|---|---|---|---|
main required | Snippet | — | The primary content area. |
supporting required | Snippet | — | The fixed-width side panel content, e.g. a table of contents or contextual actions. |
anchor | "viewport" | "parent" | "parent" | "viewport" fixes the supporting pane to the true browser edge and scrolls it independently of main — used by this docs site's own "On this page" TOC. "parent" makes it sticky (position: sticky) within a relative ancestor, scrolling together with the page. |
position | "left" | "right" | "right" | Which side the supporting pane renders on. |
centered | boolean | false | Constrains the whole layout to max-w-5xl and centers it, instead of stretching to fill the width. |
collapsible | boolean | — | Whether to show a toggle button (desktop only) that hides/shows the supporting pane, sliding the main pane to fill the space. |
mobileSheet | boolean | false | Below lg, render the supporting content as a bottom sheet opened via a floating trigger button, instead of stacking it inline. |
mobileSheetIcon | string | "info" | Material Symbol name for the mobile sheet trigger button. |
mobileTriggerClass | string | — | Extra class for the mobile trigger button, e.g. to reposition it above a Navbar. |
supportingWidth | number | 320 | Width of the supporting pane in px. Only affects layout in anchor="viewport" mode (drives a CSS custom property); "parent" mode uses the fixed lg:w-80 Tailwind class instead. |
supportingTop | number | 0 | Top offset in px for the fixed supporting pane in anchor="viewport" mode, e.g. to sit below a fixed app bar. |
gap | "none" | "sm" | "md" | "lg" | "md" | Gap applied to the main pane. |
full | boolean | true | Whether the layout stretches to min-h-dvh. |
rounded | boolean | true | Rounds the top corners of the main pane on the lg breakpoint. |
mainClass | string | — | Extra class applied to the main pane. |
supportingClass | string | — | Extra class applied to the supporting pane. |
Collapse toggle
The collapsible toggle button is a labelled ButtonIcon with aria-controls/aria-expanded pointing at the supporting panel, plus a tooltip.
Mobile sheet dialog
When mobileSheet is enabled, the sheet renders role="dialog" aria-modal="true" with a labelled close button and a scrim that dismisses it on click.