Elements

Reference

Floating Panel

FloatingPanel, dressed in the paper-and-ink system: the shared popup vessel let loose — a draggable, resizable sheet whose header is the handle. The parts — Root, Trigger, Positioner, Content, Header, Title, Control, DragTrigger, StageTrigger, CloseTrigger, ResizeTrigger, Body.

Trigger · Positioner · Content · Header · Body · Title · ResizeTrigger · DragTrigger · StageTrigger · CloseTrigger · Control

#Body

A styled part — no props of its own; it takes the anatomy's shared styling.

#CloseTrigger

A styled part — no props of its own; it takes the anatomy's shared styling.

#Content

A styled part — no props of its own; it takes the anatomy's shared styling.

#Control

A styled part — no props of its own; it takes the anatomy's shared styling.

#DragTrigger

A styled part — no props of its own; it takes the anatomy's shared styling.

A styled part — no props of its own; it takes the anatomy's shared styling.

#Positioner

A styled part — no props of its own; it takes the anatomy's shared styling.

#ResizeTrigger

PropTypeDefaultDescription
axisResizeTriggerAxisThe axis of the resize handle

#Root

PropTypeDefaultDescription
allowOverflowbooleantrueWhether the panel should be strictly contained within the boundary when dragging
closeOnEscapebooleanWhether the panel should close when the escape key is pressed
defaultOpenbooleanfalseThe initial open state of the panel when rendered. Use when you don't need to control the open state of the panel.
defaultPositionPointThe initial position of the panel when rendered. Use when you don't need to control the position of the panel.
defaultSizeSizeThe default size of the panel
dir'ltr' | 'rtl'"ltr"The document's text/writing direction.
disabledbooleanWhether the panel is disabled
draggablebooleantrueWhether the panel is draggable
finalFocusEl() => HTMLElement | nullThe element to receive focus when the panel closes
getAnchorPosition(details: floatingPanel.AnchorPositionDetails) => PointFunction that returns the initial position of the panel when it is opened. If provided, will be used instead of the default position.
getBoundaryEl() => HTMLElement | nullThe boundary of the panel. Useful for recalculating the boundary rect when the it is resized.
gridSizenumber1The snap grid for the panel
idstringThe unique identifier of the machine.
idsPartial<{ trigger: string; positioner: string; content: string; title: string; header: string; }>The ids of the elements in the floating panel. Useful for composition.
initialFocusEl() => HTMLElement | nullThe element to receive focus when the panel opens
lockAspectRatiobooleanWhether the panel is locked to its aspect ratio
maxSizeSizeThe maximum size of the panel
minSizeSizeThe minimum size of the panel
openbooleanThe controlled open state of the panel
persistRectbooleanWhether the panel size and position should be preserved when it is closed
positionPointThe controlled position of the panel
resizablebooleantrueWhether the panel is resizable
restoreFocusbooleantrueWhether to restore focus to the trigger element when the panel closes
sizeSizeThe size of the panel
strategy'absolute' | 'fixed'"absolute"The strategy to use for positioning
translationsfloatingPanel.IntlTranslationsThe translations for the floating panel.
EventPayload
exitComplete—
openChangedetails: OpenChangeDetails
update:openopen: boolean
positionChangedetails: PositionChangeDetails
update:positiondetails: Point
positionChangeEnddetails: PositionChangeDetails
sizeChangedetails: SizeChangeDetails
update:sizedetails: Size
sizeChangeEnddetails: SizeChangeDetails
stageChangedetails: StageChangeDetails

#StageTrigger

PropTypeDefaultDescription
stageStageThe stage of the panel

#Title

A styled part — no props of its own; it takes the anatomy's shared styling.

#Trigger

A styled part — no props of its own; it takes the anatomy's shared styling.