Skip to content

Supporting Pane ​

Main content with a supporting side pane (details, filters, related items). The pane sits beside the content when the main area keeps its minimum width, and otherwise moves below it or into a sheet.

Usage ​

Approximate web preview — the HarmonyOS rendering is the reference.

API ​

Extracted from the @Param / @Event / @BuilderParam declarations in the library sources.

SSupportingPane ​

Canonical "supporting pane" layout: main content plus a fixed-width side pane (details, filters, related items). Side by side when the main area keeps minMainWidth; otherwise the pane moves below the main content (compactMode: 'below') or into a bottom sheet opened by SSupportingPaneTrigger ('sheet').

Panes take their natural height; put the block inside a scroller (SPage) for long content. Extension points: controller, layoutPolicy, onWideChange, motionKey, compactMode.

PropTypeDefaultDescription
controllerSparkSupportingPaneState | undefinedundefinedyour own state object (headless control); one is created when omitted
compactModeSupportingCompactMode
SupportingCompactMode = 'below' | 'sheet'
'below'
paneWidthnumber0supporting pane width when side by side (vp, includes the gap); 0 = --supporting-pane-width, else 320
tokensSupportingPaneTokens{}per-instance look (ADR D13): instance → --supporting-pane-* tokens → recipe
minMainWidthnumber480the pane sits beside the main area only while the main area keeps this width (vp)
open!!boolean | undefinedundefinedsheet open state (narrow + 'sheet')
defaultOpenbooleanfalse
motionKeystring'supporting-pane'
EventTypeDefaultDescription
onOpenChange(open: boolean) => void() => { }
layoutPolicySparkSplitPolicysparkSupportingDefaultPolicyside by side (true) or compact (false), from the measured width (replaceable)
onWideChange(wide: boolean) => void() => { }

Slots: children (trailing closure)

SSupportingPaneMain ​

Slots: children (trailing closure)

SSupportingPaneAside ​

The supporting pane. Its title heads the pane (and the sheet when it is one).

PropTypeDefaultDescription
titleResourceStr | undefinedundefined

Slots: children (trailing closure)

SSupportingPaneTrigger ​

Opens the supporting pane's sheet; renders nothing unless the pane currently lives in a sheet.

PropTypeDefaultDescription
textResourceStr$r('app.string.spark_details')
iconstring'panel-right'

MIT Licensed