Skip to content

Floating Panel

Displays content in a floating window.

Installation

Anatomy

Usage

Examples

Controlled Size

Control the panel size programmatically using the size and onSizeChange props.

Controlled Position

Control the panel position programmatically using the position and onPositionChange props.

Custom spacing

Use [--space:--spacing("value")] on FloatingPanelContent to adjust internal padding.

Default spacing is --spacing(4).

You can use breakpoint utilities to change the internal spacing at different screen sizes.

API Reference

FloatingPanel

Root component. Manages panel position and drag state.

FloatingPanelTrigger

Opens the floating panel on click.

FloatingPanelContent

Holds the panel content.

FloatingPanelHeader

Header area. Acts as drag handle for repositioning.

FloatingPanelTitle

Title for the panel.

FloatingPanelBody

Scrollable body content. Uses ScrollArea for overflow.

FloatingPanelCloseTrigger

Closes the panel on click.


For a complete list of props, see the Ark UI documentation.