booleanWhether the panel should be strictly contained within the boundary when dragging
animateOnMount
true
booleanWhether to run the enter animation when the component mounts.
closeOnEscape
booleanWhether the panel should close when the escape key is pressed
defaultOpen
false
booleanThe initial open state of the panel when rendered.
Use when you don't need to control the open state of the panel.
defaultPosition
PointThe initial position of the panel when rendered.
Use when you don't need to control the position of the panel.
defaultSize
SizeThe default size of the panel
disabled
booleanWhether the panel is disabled
draggable
true
booleanWhether the panel is draggable
getAnchorPosition
(details: 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
() => HTMLElementThe boundary of the panel. Useful for recalculating the boundary rect when
the it is resized.
gridSize
1
numberThe snap grid for the panel
id
stringThe unique identifier of the machine.
ids
Partial<{ trigger: string; positioner: string; content: string; title: string; header: string; }>The ids of the elements in the floating panel. Useful for composition.
keepMounted
true
booleanWhether to keep the component mounted after exit.
lazyMount
false
booleanWhether to enable lazy mounting.
lockAspectRatio
booleanWhether the panel is locked to its aspect ratio
maxSize
SizeThe maximum size of the panel
minSize
SizeThe minimum size of the panel
onExitComplete
() => voidCallback that fires when the exit animation of the panel completes.
onOpenChange
(details: OpenChangeDetails) => voidFunction called when the panel is opened or closed
onPositionChange
(details: PositionChangeDetails) => voidFunction called when the position of the panel changes via dragging
onPositionChangeEnd
(details: PositionChangeDetails) => voidFunction called when the position of the panel changes via dragging ends
onSizeChange
(details: SizeChangeDetails) => voidFunction called when the size of the panel changes via resizing
onSizeChangeEnd
(details: SizeChangeDetails) => voidFunction called when the size of the panel changes via resizing ends
onStageChange
(details: StageChangeDetails) => voidFunction called when the stage of the panel changes
open
booleanThe controlled open state of the panel
persistRect
booleanWhether the panel size and position should be preserved when it is closed
position
PointThe controlled position of the panel
resizable
true
booleanWhether the panel is resizable
size
SizeThe size of the panel
strategy
"fixed"
"absolute" | "fixed"The strategy to use for positioning
translations
IntlTranslationsThe translations for the floating panel.
Body
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-dragging
Present when in the dragging state
data-maximized
Present when maximized
data-minimized
Present when minimized
data-part
body
data-scope
floating-panel
data-staged
Present when not in default stage
CloseTrigger
Prop
Default
Description
asChild
SnippetRender a different element.
Content
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-behind
Present when not topmost
data-dragging
Present when in the dragging state
data-maximized
Present when maximized
data-minimized
Present when minimized
data-part
content
data-scope
floating-panel
data-staged
Present when not in default stage
data-state
"open" | "closed"
data-topmost
Present when topmost
Control
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-disabled
Present when disabled
data-maximized
Present when maximized
data-minimized
Present when minimized
data-part
control
data-scope
floating-panel
data-stage
The stage of the control
data-staged
Present when not in default stage
DragTrigger
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-disabled
Present when disabled
data-part
drag-trigger
data-scope
floating-panel
Header
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-behind
Present when not topmost
data-dragging
Present when in the dragging state
data-maximized
Present when maximized
data-minimized
Present when minimized
data-part
header
data-scope
floating-panel
data-staged
Present when not in default stage
data-topmost
Present when topmost
Positioner
Prop
Default
Description
asChild
SnippetRender a different element.
ResizeTrigger
Prop
Default
Description
axis
"n" | "e" | "s" | "w" | "ne" | "se" | "sw" | "nw"The axis used to resize the panel.
asChild
SnippetRender a different element.
Data Attribute
Value
data-axis
The axis to resize
data-disabled
Present when disabled
data-part
resize-trigger
data-scope
floating-panel
StageTrigger
Prop
Default
Description
stage
"default" | "minimized" | "maximized"The stage to apply when triggered.