SidePanel handbook
v1.4.3 · @snowui-design-system/components
License: Before reading component documentation, source, or npm usage instructions for the first time, read the full LICENSE. Reuse that review for the same task and version. Public API configuration and internal implementation changes have different license implications. All components use the unified runtime package; source rights remain governed by the license.
Overview
Show details or supporting content at the right edge, in floating or inline mode, while preserving context from the main page.
When to use it
Use it for closable detail or auxiliary panels. Persistent notification, activity, or contact columns are page content even when they sit on the right; they do not automatically need SidePanel.
Control visibility with
bind:open;placementchooses floating or inline. Bindwidthand constrain resizing with minimum and maximum widths.childrenprovides scrollable content. For inline mode,inlineMotionOwnerassigns panel movement to one owner so the page rail and component do not move it twice.When title is omitted, the toolbar title and panel accessible name follow LocaleProvider. An explicit title, including an empty string, and business content remain unchanged.
Quick start
This example shows the recommended basic composition. See the sections below for more cases and composition limits.
API
See the base component documentation for inherited capabilities not redeclared here. This table lists only named public Props declared by this component.
Usage boundaries and details
Replacing bottom toolbar groups
Priority: bottomLeading/bottomTrailing Snippet > corresponding actions array > generated defaults.
The top toolbar (preview toggle, previous/next item, title, close) cannot be replaced through Props or Snippets.
Inline layout effect
The documented placement="inline" behavior follows SidePanel-Demo.svelte (playground/demo/SidePanel-Demo.svelte). SidePanel stays in a floating dock rather than ordinary document flow:
A fixed layer and rail carry SidePanel above other page content.
The page adds
padding-rightto selected content, reducing its available width.Areas outside that reserved space keep their layout and may be covered by the panel.
One
inlineActivestate and one helper update panel movement and content contraction together, keeping visual timing aligned.
“Inline” means the panel participates in the page’s available-space allocation, not that its visual layer enters normal document flow. The page explicitly chooses what content contracts; SidePanel still floats above it.
Responsibility split
Choosing contracted and covered content
Contract all main content: place header, Table, pagination, and related content in
data-side-panel-layoutand consumepadding-righttogether.Contract only Table: only its wrapper consumes
--snowui-side-panel-layout-space; header or left navigation outside can be covered.Allow panel to cover a floating control: the control consumes no layout space and uses a
z-indexbelowdata-side-panel-layer.Keep a control above the panel: the control consumes no layout space, and the page gives it a
z-indexabove the panel layer.
SidePanel does not query Table, main, or header, or rewrite sibling widths. Page structure and CSS explicitly define the affected layout scope.
Coordinated motion
RareUI’s reference moves panel x with the same state as main-content paddingRight. SnowUI follows that synchronization with its own SIDE_PANEL_APPEAR_MOTION/SIDE_PANEL_DISAPPEAR_MOTION: critically damped spring 300 / 34.6410161514 / 1, 500ms trajectory window, no rebound, and enough distance to exit fully.
Default inline integration requires:
Set
inlineActivetoopen && placement === "inline".Call
createSidePanelLayoutMotionStyle(inlineActive, panelWidth, 16)once and apply its result to the coordination container.Content
padding-rightand railtransformconsume helper variables directly, without separate duration or easing.Pass
inlineMotionOwner="layout"so component and rail transforms do not stack.Keep layer and rail mounted; SidePanel follows its presence lifecycle and unmounts after exit.
Reduced-motion preference disables both content contraction and rail travel transitions.
The helper exposes page-level bridge variables:
Complete default example
Height and viewport spacing
SidePanel can fill a height, but the page chooses the coordinate space:
Do not combine the component’s default 100dvh - 32px height with rail top/bottom constraints. Let rail set height and pass height: 100% to SidePanel so there is one source of truth.
Styling inline mode
Layout model
Main layout model: composite management layout. See LayoutProtocol §12.3 (specs/maintainers/LayoutProtocol.md).
Example
Floating backdrop
No backdrop by default; the previous backdrop selection is retained for mode switching. backdrop="opaque" adds a 10% black mask, "blur" adds var(--size-5) (20px) blur to the same mask, and "transparent" only blocks interaction. Shared .snowui-backdrop supplies visuals; Dialog motion tokens fade it with SidePanel presence. Inline mode shows no mask. Clicking it follows closeOnOutside; close button and Escape are unchanged.
The shared Backdrop (components/src/lib/backdrop.md) fades from transparent and follows the same reduced-motion rules as Dialog and ImageViewer.
SidePanel style overlay
Read the full LICENSE first; reuse that review for the same task, version, and scope.
First use public component Props to match the desired appearance, preserving the existing look where possible. If changes are necessary, follow the style selection and override order: use your own class (including Tailwind already in the project) or an instance style. The names below are public overrides actually consumed by source; check their scope and do not modify private DOM. Choose the correct SnowUI token family. External apps need not install SnowUI website utilities.
SidePanel type and status
Required Props: no named required Props.
Bidirectional binding: bind:open, bind:placement, bind:width.
Inheritance statement: Omit<FrameProps, "children" | "width">. The inheritance ability is subject to the public document of the base class; the fields in Omit have been excluded and cannot be used as they are according to the base class.
The following type declarations are actually referenced by public Props and come from source. A Svelte Snippet denotes a content fragment; ComponentProps denotes the Props of the corresponding component.
SidePanelPlacement
Source: components/src/lib/side-panel.ts
SidePanelToolbarAction
Source: components/src/lib/side-panel.ts
SidePanelActionRole
Source: components/src/lib/side-panel.ts
DialogBackdrop
Source: components/src/logic/dialog.svelte.ts
ComponentPartsOf
Source: components/src/logic/component-parts.svelte.ts
ConfigurableComponentPartProps
Source: components/src/logic/component-parts.svelte.ts
ComponentPartControlledKey
Source: components/src/logic/component-parts.svelte.ts