Stable

Supporting Pane

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.

Overview

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

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

Live Demo

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.

widgets

Playground

Open the SupportingPane story — includes Collapsible and Position Left variants.

Basic Usage

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>

SupportingPane Props

PropTypeDefaultDescription
main required
SnippetThe primary content area.
supporting required
SnippetThe 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
booleanfalseConstrains the whole layout to max-w-5xl and centers it, instead of stretching to fill the width.
collapsible
booleanWhether to show a toggle button (desktop only) that hides/shows the supporting pane, sliding the main pane to fill the space.
mobileSheet
booleanfalseBelow 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
stringExtra class for the mobile trigger button, e.g. to reposition it above a Navbar.
supportingWidth
number320Width 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
number0Top 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
booleantrueWhether the layout stretches to min-h-dvh.
rounded
booleantrueRounds the top corners of the main pane on the lg breakpoint.
mainClass
stringExtra class applied to the main pane.
supportingClass
stringExtra class applied to the supporting pane.

Accessibility

toggle_on

Collapse toggle

The collapsible toggle button is a labelled ButtonIcon with aria-controls/aria-expanded pointing at the supporting panel, plus a tooltip.

vertical_split

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.