Router that virtually distributes inference across connected devices in the home.
SidePanel
A dialog pinned to the left or right side of the screen that can be triggered by a button or other
element. Uses the native <dialog> element for progressive enhancement, providing built-in
backdrop styling, focus management, and support for form method="dialog" for native close behavior.
Use a side panel when you need to show supplementary content or actions while maintaining the context of the main view. Side panels are ideal for tasks that require user input or displaying additional information without navigating away from the current page.
Common use cases include:
- Displaying details about a selected item
- Forms that need context from the main view
- Configuration panels
- Multi-step workflows
- Preview panels
Consider a Modal instead when:
- The task requires full user attention and blocking interaction with the main content
- The content needs to be center-focused
- The interaction is brief and doesn't require context from the main view
Examples
Basic Side Panel
Use when you need to show supplementary content while maintaining context of the main view.
<SidePanel
slotTrigger={<Button>Open Panel</Button>}
slotHeading="Details"
slotFooter={
<>
<SidePanelCloseButton kind="tertiary">Cancel</SidePanelCloseButton>
<Button color="brand">Save</Button>
</>
}
>
Panel content with supplementary information.
</SidePanel>
Modal Side Panel
Use when the side panel content requires focused attention and should block interaction with the main page.
<SidePanel
modal
bordered
slotTrigger={<Button>Open Modal Panel</Button>}
slotHeading="Important Information"
slotFooter={
<>
<SidePanelCloseButton kind="tertiary">Close</SidePanelCloseButton>
<Button color="brand">Acknowledge</Button>
</>
}
>
This panel requires focused attention with a backdrop overlay.
</SidePanel>
Form Side Panel
Use when the side panel wraps a form that needs native form submission behavior.
<SidePanel
bordered
slotTrigger={<Button>Open Form</Button>}
slotHeading="Create Resource"
renderContent={({ children }) => <form onSubmit={handleSubmit}>{children}</form>}
slotFooter={
<>
<SidePanelCloseButton kind="tertiary">Cancel</SidePanelCloseButton>
<Button type="submit" color="brand">
Create
</Button>
</>
}
>
Form fields go here
</SidePanel>
Custom Width Side Panel
Use when the default panel width is insufficient for the content being displayed.
<SidePanel
bordered
slotTrigger={<Button>Open Wide Panel</Button>}
slotHeading="Wide Panel"
style={{ '--side-panel-width': '500px' }}
>
This panel uses a custom width for content that needs more space.
</SidePanel>
With Navigation Side Panel
Use when the panel needs tabs or breadcrumbs sitting between the heading and the main content.
<SidePanel
bordered
slotTrigger={<Button>Open Panel</Button>}
slotHeading="Architecture"
slotNavigation={
<Tabs
defaultValue="layers"
items={[
{ children: 'Layers', value: 'layers' },
{ children: 'Parameters', value: 'parameters' },
{ children: 'Performance', value: 'performance' }
]}
/>
}
slotFooter={
<>
<SidePanelCloseButton kind="tertiary">Cancel</SidePanelCloseButton>
<Button color="brand">Save</Button>
</>
}
>
Tab content rendered here.
</SidePanel>
Relative Side Panel
Use when the panel should be confined to a parent region rather than overlaying the viewport. The parent must be position: relative with overflow: hidden.
<div
style={{
position: 'relative',
height: 400,
width: 500,
overflow: 'hidden',
border: '1px dashed currentColor'
}}
>
<SidePanel relative slotTrigger={<Button>Open Panel</Button>} slotHeading="Cluster Status">
Cluster monitoring and management.
</SidePanel>
</div>
Default Open Side Panel
Use when the panel's open state is driven by SSR or URL params — render with defaultOpen so the panel appears open on the first paint.
<SidePanel
defaultOpen
bordered
slotTrigger={<Button>Edit Task</Button>}
slotHeading="Edit Task"
slotFooter={
<>
<SidePanelCloseButton kind="tertiary">Cancel</SidePanelCloseButton>
<Button color="brand">Save</Button>
</>
}
>
Form fields go here.
</SidePanel>
Anchor Trigger Side Panel
Use when the panel must open from a regular link for SSR-friendly, no-JS progressive enhancement. Requires id plus an <a href='#id'> passed via slotAnchorTrigger.
<SidePanel
id="settings-panel"
bordered
slotAnchorTrigger={<a href="#settings-panel">Open Settings</a>}
slotHeading="Settings"
slotFooter={<SidePanelCloseButton kind="tertiary">Close</SidePanelCloseButton>}
>
Settings content here.
</SidePanel>
Native Form Dialog Side Panel
Use when the panel hosts a server-action form and cancel must close without submitting. formMethod="dialog" lets the native dialog close without JavaScript.
<SidePanel
bordered
slotTrigger={<Button>Edit Task</Button>}
slotHeading="Edit Task"
attributes={{
SidePanelCloseButton: {
type: 'submit',
formMethod: 'dialog',
formNoValidate: true
}
}}
renderContent={({ children }) => (
<form action="/api/update-task" method="post">
{children}
</form>
)}
slotFooter={
<>
<input type="hidden" name="taskId" value="123" />
<Button type="submit" formMethod="dialog" formNoValidate kind="tertiary">
Cancel
</Button>
<Button type="submit" color="brand">
Save Changes
</Button>
</>
}
>
Form fields go here.
</SidePanel>
Below App Bar Side Panel
Use when the page has a fixed AppBar — offset the panel by the AppBar height so it docks beneath the bar instead of overlapping it.
<SidePanel
bordered
className="top-[var(--nv-app-bar-height)]"
slotTrigger={<Button>Open Side Panel</Button>}
slotHeading="Heading"
slotFooter={<SidePanelCloseButton kind="tertiary">Close</SidePanelCloseButton>}
>
Panel content sits below a fixed AppBar.
</SidePanel>
Multi Step Side Panel
Use a multi-step pattern for wizards, guided flows, or any task that progresses through discrete stages. Track the current step in state and use ml-auto on the cancel button to push the primary action to the trailing edge.
;() => {
const [step, setStep] = useState(0)
const totalSteps = 3
const isFirstStep = step === 0
const isLastStep = step === totalSteps - 1
return (
<SidePanel
bordered
slotTrigger={<Button>Open Side Panel</Button>}
slotHeading={`Step ${step + 1} of ${totalSteps}`}
slotFooter={
<>
<Button
kind="secondary"
disabled={isFirstStep}
onClick={() => setStep(s => Math.max(0, s - 1))}
>
Back
</Button>
<SidePanelCloseButton className="ml-auto" kind="tertiary">
Cancel
</SidePanelCloseButton>
<Button
color="brand"
onClick={() => setStep(s => Math.min(totalSteps - 1, s + 1))}
disabled={isLastStep}
>
Next
</Button>
</>
}
>
<Flex direction="col" gap="2">
Content for step {step + 1}.
</Flex>
</SidePanel>
)
}
Composed
Use composed primitives when you need full control over the side panel layout and behavior.
<SidePanelRoot>
<SidePanelTrigger asChild>
<Button>Open Panel</Button>
</SidePanelTrigger>
<SidePanelContent bordered>
<SidePanelHeading>Composed Heading</SidePanelHeading>
<SidePanelMain>Composed side panel content using primitives directly.</SidePanelMain>
<SidePanelFooter>
<SidePanelCloseButton kind="tertiary">Cancel</SidePanelCloseButton>
<Button color="brand">Save</Button>
</SidePanelFooter>
</SidePanelContent>
</SidePanelRoot>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| asChild | boolean |
- | When true, treats the immediate child as the host element, merging this component's props with the child's props. The child's children will be slotted into the component's defined content placement. |
| bordered | boolean |
false |
When true, adds a border between the main content and the header/footer. This should almost always be true. |
| children | ReactNode |
- | The content to render in the panel. This will be rendered in the main content area of the panel, between the heading and footer. This includes text-primary and body/regular/md typography styles. It's also a flex column with gap spacing. |
| closeButtonProps | { form?: string; slot?: string; style?: React.CSSProperties; title?: string; defaultValue?: string | number | readonly string[]; ref?: React.Ref<HTMLButtonElement>; key?: React.Key; defaultChecked?: boolean; suppressContentEditableWarning?: boolean; suppressHydrationWarning?: boolean; accessKey?: string; autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | (string & {}); autoFocus?: boolean; contentEditable?: Booleanish | "inherit" | "plaintext-only"; contextMenu?: string; dir?: string; draggable?: Booleanish; enterKeyHint?: "search" | "enter" | "done" | "go" | "next" | "previous" | "send"; hidden?: boolean; id?: string; lang?: string; nonce?: string; spellCheck?: Booleanish; tabIndex?: number; translate?: "yes" | "no"; radioGroup?: string; role?: React.AriaRole; about?: string; content?: string; datatype?: string; inlist?: any; prefix?: string; property?: string; rel?: string; resource?: string; rev?: string; typeof?: string; vocab?: string; autoCorrect?: string; autoSave?: string; itemProp?: string; itemScope?: boolean; itemType?: string; itemID?: string; itemRef?: string; results?: number; security?: string; unselectable?: "off" | "on"; popover?: "" | "auto" | "manual"; popoverTargetAction?: "toggle" | "show" | "hide"; popoverTarget?: string; inert?: boolean; inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal"; is?: string; exportparts?: string; part?: string; "aria-activedescendant"?: string; "aria-atomic"?: Booleanish; "aria-autocomplete"?: "none" | "list" | "inline" | "both"; "aria-braillelabel"?: string; "aria-brailleroledescription"?: string; "aria-busy"?: Booleanish; "aria-checked"?: boolean | "true" | "false" | "mixed"; "aria-colcount"?: number; "aria-colindex"?: number; "aria-colindextext"?: string; "aria-colspan"?: number; "aria-controls"?: string; "aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date"; "aria-describedby"?: string; "aria-description"?: string; "aria-details"?: string; "aria-disabled"?: Booleanish; "aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup"; "aria-errormessage"?: string; "aria-expanded"?: Booleanish; "aria-flowto"?: string; "aria-grabbed"?: Booleanish; "aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree"; "aria-hidden"?: Booleanish; "aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling"; "aria-keyshortcuts"?: string; "aria-label"?: string; "aria-labelledby"?: string; "aria-level"?: number; "aria-live"?: "off" | "assertive" | "polite"; "aria-modal"?: Booleanish; "aria-multiline"?: Booleanish; "aria-multiselectable"?: Booleanish; "aria-orientation"?: "horizontal" | "vertical"; "aria-owns"?: string; "aria-placeholder"?: string; "aria-posinset"?: number; "aria-pressed"?: boolean | "true" | "false" | "mixed"; "aria-readonly"?: Booleanish; "aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals"; "aria-required"?: Booleanish; "aria-roledescription"?: string; "aria-rowcount"?: number; "aria-rowindex"?: number; "aria-rowindextext"?: string; "aria-rowspan"?: number; "aria-selected"?: Booleanish; "aria-setsize"?: number; "aria-sort"?: "none" | "ascending" | "descending" | "other"; "aria-valuemax"?: number; "aria-valuemin"?: number; "aria-valuenow"?: number; "aria-valuetext"?: string; dangerouslySetInnerHTML?: { __html: string | TrustedHTML; }; onCopy?: React.ClipboardEventHandler<HTMLButtonElement>; onCopyCapture?: React.ClipboardEventHandler<HTMLButtonElement>; onCut?: React.ClipboardEventHandler<HTMLButtonElement>; onCutCapture?: React.ClipboardEventHandler<HTMLButtonElement>; onPaste?: React.ClipboardEventHandler<HTMLButtonElement>; onPasteCapture?: React.ClipboardEventHandler<HTMLButtonElement>; onCompositionEnd?: React.CompositionEventHandler<HTMLButtonElement>; onCompositionEndCapture?: React.CompositionEventHandler<HTMLButtonElement>; onCompositionStart?: React.CompositionEventHandler<HTMLButtonElement>; onCompositionStartCapture?: React.CompositionEventHandler<HTMLButtonElement>; onCompositionUpdate?: React.CompositionEventHandler<HTMLButtonElement>; onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLButtonElement>; onFocus?: React.FocusEventHandler<HTMLButtonElement>; onFocusCapture?: React.FocusEventHandler<HTMLButtonElement>; onBlur?: React.FocusEventHandler<HTMLButtonElement>; onBlurCapture?: React.FocusEventHandler<HTMLButtonElement>; onChange?: React.FormEventHandler<HTMLButtonElement>; onChangeCapture?: React.FormEventHandler<HTMLButtonElement>; onBeforeInput?: React.InputEventHandler<HTMLButtonElement>; onBeforeInputCapture?: React.FormEventHandler<HTMLButtonElement>; onInput?: React.FormEventHandler<HTMLButtonElement>; onInputCapture?: React.FormEventHandler<HTMLButtonElement>; onReset?: React.FormEventHandler<HTMLButtonElement>; onResetCapture?: React.FormEventHandler<HTMLButtonElement>; onSubmit?: React.FormEventHandler<HTMLButtonElement>; onSubmitCapture?: React.FormEventHandler<HTMLButtonElement>; onInvalid?: React.FormEventHandler<HTMLButtonElement>; onInvalidCapture?: React.FormEventHandler<HTMLButtonElement>; onLoad?: React.ReactEventHandler<HTMLButtonElement>; onLoadCapture?: React.ReactEventHandler<HTMLButtonElement>; onError?: React.ReactEventHandler<HTMLButtonElement>; onErrorCapture?: React.ReactEventHandler<HTMLButtonElement>; onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>; onKeyDownCapture?: React.KeyboardEventHandler<HTMLButtonElement>; onKeyPress?: React.KeyboardEventHandler<HTMLButtonElement>; onKeyPressCapture?: React.KeyboardEventHandler<HTMLButtonElement>; onKeyUp?: React.KeyboardEventHandler<HTMLButtonElement>; onKeyUpCapture?: React.KeyboardEventHandler<HTMLButtonElement>; onAbort?: React.ReactEventHandler<HTMLButtonElement>; onAbortCapture?: React.ReactEventHandler<HTMLButtonElement>; onCanPlay?: React.ReactEventHandler<HTMLButtonElement>; onCanPlayCapture?: React.ReactEventHandler<HTMLButtonElement>; onCanPlayThrough?: React.ReactEventHandler<HTMLButtonElement>; onCanPlayThroughCapture?: React.ReactEventHandler<HTMLButtonElement>; onDurationChange?: React.ReactEventHandler<HTMLButtonElement>; onDurationChangeCapture?: React.ReactEventHandler<HTMLButtonElement>; onEmptied?: React.ReactEventHandler<HTMLButtonElement>; onEmptiedCapture?: React.ReactEventHandler<HTMLButtonElement>; onEncrypted?: React.ReactEventHandler<HTMLButtonElement>; onEncryptedCapture?: React.ReactEventHandler<HTMLButtonElement>; onEnded?: React.ReactEventHandler<HTMLButtonElement>; onEndedCapture?: React.ReactEventHandler<HTMLButtonElement>; onLoadedData?: React.ReactEventHandler<HTMLButtonElement>; onLoadedDataCapture?: React.ReactEventHandler<HTMLButtonElement>; onLoadedMetadata?: React.ReactEventHandler<HTMLButtonElement>; onLoadedMetadataCapture?: React.ReactEventHandler<HTMLButtonElement>; onLoadStart?: React.ReactEventHandler<HTMLButtonElement>; onLoadStartCapture?: React.ReactEventHandler<HTMLButtonElement>; onPause?: React.ReactEventHandler<HTMLButtonElement>; onPauseCapture?: React.ReactEventHandler<HTMLButtonElement>; onPlay?: React.ReactEventHandler<HTMLButtonElement>; onPlayCapture?: React.ReactEventHandler<HTMLButtonElement>; onPlaying?: React.ReactEventHandler<HTMLButtonElement>; onPlayingCapture?: React.ReactEventHandler<HTMLButtonElement>; onProgress?: React.ReactEventHandler<HTMLButtonElement>; onProgressCapture?: React.ReactEventHandler<HTMLButtonElement>; onRateChange?: React.ReactEventHandler<HTMLButtonElement>; onRateChangeCapture?: React.ReactEventHandler<HTMLButtonElement>; onSeeked?: React.ReactEventHandler<HTMLButtonElement>; onSeekedCapture?: React.ReactEventHandler<HTMLButtonElement>; onSeeking?: React.ReactEventHandler<HTMLButtonElement>; onSeekingCapture?: React.ReactEventHandler<HTMLButtonElement>; onStalled?: React.ReactEventHandler<HTMLButtonElement>; onStalledCapture?: React.ReactEventHandler<HTMLButtonElement>; onSuspend?: React.ReactEventHandler<HTMLButtonElement>; onSuspendCapture?: React.ReactEventHandler<HTMLButtonElement>; onTimeUpdate?: React.ReactEventHandler<HTMLButtonElement>; onTimeUpdateCapture?: React.ReactEventHandler<HTMLButtonElement>; onVolumeChange?: React.ReactEventHandler<HTMLButtonElement>; onVolumeChangeCapture?: React.ReactEventHandler<HTMLButtonElement>; onWaiting?: React.ReactEventHandler<HTMLButtonElement>; onWaitingCapture?: React.ReactEventHandler<HTMLButtonElement>; onAuxClick?: React.MouseEventHandler<HTMLButtonElement>; onAuxClickCapture?: React.MouseEventHandler<HTMLButtonElement>; onClick?: React.MouseEventHandler<HTMLButtonElement>; onClickCapture?: React.MouseEventHandler<HTMLButtonElement>; onContextMenu?: React.MouseEventHandler<HTMLButtonElement>; onContextMenuCapture?: React.MouseEventHandler<HTMLButtonElement>; onDoubleClick?: React.MouseEventHandler<HTMLButtonElement>; onDoubleClickCapture?: React.MouseEventHandler<HTMLButtonElement>; onDrag?: React.DragEventHandler<HTMLButtonElement>; onDragCapture?: React.DragEventHandler<HTMLButtonElement>; onDragEnd?: React.DragEventHandler<HTMLButtonElement>; onDragEndCapture?: React.DragEventHandler<HTMLButtonElement>; onDragEnter?: React.DragEventHandler<HTMLButtonElement>; onDragEnterCapture?: React.DragEventHandler<HTMLButtonElement>; onDragExit?: React.DragEventHandler<HTMLButtonElement>; onDragExitCapture?: React.DragEventHandler<HTMLButtonElement>; onDragLeave?: React.DragEventHandler<HTMLButtonElement>; onDragLeaveCapture?: React.DragEventHandler<HTMLButtonElement>; onDragOver?: React.DragEventHandler<HTMLButtonElement>; onDragOverCapture?: React.DragEventHandler<HTMLButtonElement>; onDragStart?: React.DragEventHandler<HTMLButtonElement>; onDragStartCapture?: React.DragEventHandler<HTMLButtonElement>; onDrop?: React.DragEventHandler<HTMLButtonElement>; onDropCapture?: React.DragEventHandler<HTMLButtonElement>; onMouseDown?: React.MouseEventHandler<HTMLButtonElement>; onMouseDownCapture?: React.MouseEventHandler<HTMLButtonElement>; onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>; onMouseLeave?: React.MouseEventHandler<HTMLButtonElement>; onMouseMove?: React.MouseEventHandler<HTMLButtonElement>; onMouseMoveCapture?: React.MouseEventHandler<HTMLButtonElement>; onMouseOut?: React.MouseEventHandler<HTMLButtonElement>; onMouseOutCapture?: React.MouseEventHandler<HTMLButtonElement>; onMouseOver?: React.MouseEventHandler<HTMLButtonElement>; onMouseOverCapture?: React.MouseEventHandler<HTMLButtonElement>; onMouseUp?: React.MouseEventHandler<HTMLButtonElement>; onMouseUpCapture?: React.MouseEventHandler<HTMLButtonElement>; onSelect?: React.ReactEventHandler<HTMLButtonElement>; onSelectCapture?: React.ReactEventHandler<HTMLButtonElement>; onTouchCancel?: React.TouchEventHandler<HTMLButtonElement>; onTouchCancelCapture?: React.TouchEventHandler<HTMLButtonElement>; onTouchEnd?: React.TouchEventHandler<HTMLButtonElement>; onTouchEndCapture?: React.TouchEventHandler<HTMLButtonElement>; onTouchMove?: React.TouchEventHandler<HTMLButtonElement>; onTouchMoveCapture?: React.TouchEventHandler<HTMLButtonElement>; onTouchStart?: React.TouchEventHandler<HTMLButtonElement>; onTouchStartCapture?: React.TouchEventHandler<HTMLButtonElement>; onPointerDown?: React.PointerEventHandler<HTMLButtonElement>; onPointerDownCapture?: React.PointerEventHandler<HTMLButtonElement>; onPointerMove?: React.PointerEventHandler<HTMLButtonElement>; onPointerMoveCapture?: React.PointerEventHandler<HTMLButtonElement>; onPointerUp?: React.PointerEventHandler<HTMLButtonElement>; onPointerUpCapture?: React.PointerEventHandler<HTMLButtonElement>; onPointerCancel?: React.PointerEventHandler<HTMLButtonElement>; onPointerCancelCapture?: React.PointerEventHandler<HTMLButtonElement>; onPointerEnter?: React.PointerEventHandler<HTMLButtonElement>; onPointerLeave?: React.PointerEventHandler<HTMLButtonElement>; onPointerOver?: React.PointerEventHandler<HTMLButtonElement>; onPointerOverCapture?: React.PointerEventHandler<HTMLButtonElement>; onPointerOut?: React.PointerEventHandler<HTMLButtonElement>; onPointerOutCapture?: React.PointerEventHandler<HTMLButtonElement>; onGotPointerCapture?: React.PointerEventHandler<HTMLButtonElement>; onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLButtonElement>; onLostPointerCapture?: React.PointerEventHandler<HTMLButtonElement>; onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLButtonElement>; onScroll?: React.UIEventHandler<HTMLButtonElement>; onScrollCapture?: React.UIEventHandler<HTMLButtonElement>; onScrollEnd?: React.UIEventHandler<HTMLButtonElement>; onScrollEndCapture?: React.UIEventHandler<HTMLButtonElement>; onWheel?: React.WheelEventHandler<HTMLButtonElement>; onWheelCapture?: React.WheelEventHandler<HTMLButtonElement>; onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>; onAnimationStartCapture?: React.AnimationEventHandler<HTMLButtonElement>; onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>; onAnimationEndCapture?: React.AnimationEventHandler<HTMLButtonElement>; onAnimationIteration?: React.AnimationEventHandler<HTMLButtonElement>; onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement>; onToggle?: React.ToggleEventHandler<HTMLButtonElement>; onBeforeToggle?: React.ToggleEventHandler<HTMLButtonElement>; onTransitionCancel?: React.TransitionEventHandler<HTMLButtonElement>; onTransitionCancelCapture?: React.TransitionEventHandler<HTMLButtonElement>; onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement>; onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement>; onTransitionRun?: React.TransitionEventHandler<HTMLButtonElement>; onTransitionRunCapture?: React.TransitionEventHandler<HTMLButtonElement>; onTransitionStart?: React.TransitionEventHandler<HTMLButtonElement>; onTransitionStartCapture?: React.TransitionEventHandler<HTMLButtonElement>; asChild?: boolean; disabled?: boolean; name?: string; value?: string | number | readonly string[]; formAction?: string | ((formData: FormData) => void | Promise<void>); formEncType?: string; formMethod?: string; formNoValidate?: boolean; formTarget?: string; type?: "button" | "submit" | "reset"; size?: "small" | "tiny" | "medium" | "large"; } |
- | Props to pass to the close button. This can be used to customize the close button's behavior for progressive enhancement scenarios. |
| closeOnClickOutside | boolean |
- | |
| defaultOpen | boolean |
false |
Initial open state when the dialog is uncontrolled. |
| density | "compact" | "standard" | "spacious" |
"standard" |
The "density" of the component. This affects the padding/spacing of the component and its children. By default, the component will inherit density from its parent, which is usually standard. - Setting to null or undefined will allow the component to inherit density from its parent. - Setting to compact will reduce the padding/spacing of the component and its children. - Setting to standard will use the standard padding/spacing of the component and its children. - Setting to spacious will increase the padding/spacing of the component and its children. |
| disabled | boolean |
- | Disables the side panel trigger |
| forceMount | boolean |
- | |
| hideCloseButton | boolean |
- | When true, hides the side panel's close button. Useful for panels that should not be dismissible. |
| modal | boolean |
true |
When true, the dialog is opened via HTMLDialogElement.showModal(), rendering a top-layer backdrop and trapping focus. When false, the dialog is opened via HTMLDialogElement.show() as a non-modal dialog. |
| onEscapeKeyDown | (event: KeyboardEvent) => void |
- | |
| onInteractOutside | (event: MouseEvent) => void |
- | Event handler called when an interaction event occurs outside the bounds of the component. It can be prevented by calling event.preventDefault. |
| onOpenAutoFocus | (event: Event) => void |
- | |
| onOpenChange | (open: boolean) => void |
- | Callback invoked whenever the dialog's open state changes, in both controlled and uncontrolled modes. Consecutive transitions to the same value are deduped, so the callback fires at most once per state change. |
| onPointerDownOutside | (event: MouseEvent) => void |
- | Event handler called when a pointer event occurs outside the bounds of the component. It can be prevented by calling event.preventDefault. |
| open | boolean |
- | Controlled open state. When provided, the hook operates in controlled mode and defaultOpen is ignored. The consumer is responsible for updating this value in response to {@link UseDialogOptions.onOpenChange} callbacks. |
| relative | boolean |
false |
When true, positions the side panel absolutely within its closest positioned ancestor instead of fixed to the viewport. The parent element must have position: relative and overflow: hidden set. |
| renderContent | (props: { children: React.ReactNode; }) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> |
- | A render function that wraps the side panel content. This is useful for injecting elements like forms. When provided, this will force asChild on the SidePanelContent component. |
| side | "right" | "left" |
"right" |
Which side the panel should appear from |
| slotAnchorTrigger | ReactNode |
- | The content to render in the panel anchor trigger. |
| slotFooter | ReactNode |
- | The content to render in the panel footer. Handles spacing and aligns content to the end of the container. |
| slotHeading | ReactNode |
- | The content to render in the panel heading. If not provided, the panel will render empty space to make room for the close button. Has label/bold/lg typography styles and handles icon sizing/color. |
| slotNavigation | ReactNode |
- | A slot that is rendered between the heading and main content. This slot is intended to be used for navigation content, such as tabs or breadcrumbs. |
| slotTrigger | ReactNode |
- | The content to render in the panel trigger. |