Skip to content

Floating Panel

Pro

A small window over the page that people can move, resize, fold to its header, or make full size. On phones it opens as a bottom sheet.

  • Base UI
  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 9, 2026 · Pro license

Playground

Loading the preview

Props

Needs your Pro API key in GELATIN_UI_PRO_TOKEN. Set it up

Pro itemAPI key required

Floating Panel needs a Pro API key

Try the live preview for free. With Pro, the add command above puts the source in your project.

Files it adds
41
More Pro items, one API key
+327
Your coding agent runs it
1 cmd

$79$129once, for life

Already have Pro? Sign in to set up your API key.

A trigger opens a panel that people drag by its header, size by its edges, and minimize or close.

layers-panel.tsx

FloatingPanel

PropTypeDefaultDescription
onOpenChange—Called when the panel opens or closes, with the Base UI details (the reason, cancel). On a phone the details are the ones of the Drawer.
childrenReactNode—
stage"default""maximized""minimized"—The stage: default (its own rect), minimized (the header pill), maximized.
defaultStage"default""maximized""minimized""default"The stage at mount when stage is not set. Default default.
onStageChange—
position—The place in px from the top left corner of the boundary (controlled).
defaultPosition—The place at the first open. Default: the center of the boundary.
onPositionChange—Called after a drag settles, a key move, or a resize from a top or left edge.
size—The size in px (controlled).
defaultSizeFLOATING_PANEL.sizeThe size at the first open. Default 320 × 360.
onSizeChange—Called after a pointer or key resize.
minSizeFLOATING_PANEL.minSizeThe smallest size of a resize. Default 200 × 120.
maxSize—The largest size of a resize. Default: the boundary.
boundaryFloatingPanelBoundary"viewport"Where the panel may go: "viewport" (default, fixed) or a ref to an element (absolute in it: give it position: relative). At least 48px of the header always stays inside.
draggablebooleantrueMove by the grip. Default true. Off: no grip, the title starts 12px in.
resizablebooleantrueResize from the edges. Default true.
resizeEdgesreadonly FloatingPanelEdge[]FLOATING_PANEL_EDGESThe edges that resize. Default all 8.
closeOnEscapebooleantrueEscape closes the front panel. Default true. A panel behind the front one never closes.
persistKeystring—Saves the place, the size, and the stage under this key for the next visit. Off by default.
labels—The words of the controls.
From Base UIDialog.RootBase UI docs
openboolean—Whether the dialog is currently open.
defaultOpenbooleanfalseWhether the dialog is initially open. To render a controlled dialog, use the open prop instead.
onOpenChangeComplete—Event handler called after any animations complete when the dialog is opened or closed.

FloatingPanelTrigger

<button>
PropTypeDefaultDescription
classNamestring—
From Base UIDialog.TriggerBase UI docs
handleDialogHandle<unknown>—A handle to associate the trigger with a dialog. Can be created with the Dialog.createHandle method.
payloadunknown—A payload to pass to the dialog when it is opened.
idstring—ID of the trigger. In addition to being forwarded to the rendered element, it is also used to specify the active trigger for the dialog in controlled mode (with the DialogRoot triggerId prop).
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

FloatingPanelContent

<div>
PropTypeDefaultDescription
classNamestring—
From Base UIDialog.PopupBase UI docs
initialFocus—Determines the element to focus when the dialog is opened. By default, focus moves to the first tabbable element inside the popup, except when the dialog is opened by touch — then the popup itself is focused to avoid opening the virtual keyboard. - false: Do not move focus. - true: Move focus based on the default behavior (first tabbable element or popup). - RefObject: Move focus to the ref element. - function: Called with the interaction type (mouse, touch, pen, or keyboard). Return an element to focus, true to use the default behavior, null to fall back to the default behavior, or false/undefined to do nothing.
finalFocus—Determines the element to focus when the dialog is closed. - false: Do not move focus. - true: Move focus based on the default behavior (trigger or previously focused element). - RefObject: Move focus to the ref element. - function: Called with the interaction type (mouse, touch, pen, or keyboard). Return an element to focus, true to use the default behavior, null to fall back to the default behavior, or false/undefined to do nothing.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

FloatingPanelHeader

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

FloatingPanelDragHandle

<button>
PropTypeDefaultDescription
classNamestring—
busyboolean—The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading.
spinnerPlacement"center""start"—center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label.
glass"clear""dark""light"—
rounded"default""full"—
size"default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs"—
variant"dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary"—
childrenReactNode—
From Base UIButtonBase UI docs
focusableWhenDisabledbooleanfalseWhether the button should be focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

FloatingPanelTitle

<div>
PropTypeDefaultDescription
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

FloatingPanelDescription

<div>
PropTypeDefaultDescription
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

FloatingPanelControls

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

FloatingPanelStageTrigger

<button>
PropTypeDefaultDescription
glass"clear""dark""light"—
rounded"default""full"—
size"default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs"—
variant"dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary"—
classNamestring—
busyboolean—The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading.
spinnerPlacement"center""start"—center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label.
stageRequired"maximized""minimized"—The stage this control goes to: minimized (Minimize, then Expand) or maximized.
From Base UIButtonBase UI docs
focusableWhenDisabledbooleanfalseWhether the button should be focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

FloatingPanelClose

<div>
PropTypeDefaultDescription
classNamestring—
childrenReactNode—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

FloatingPanelBody

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

FloatingPanelFooter

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Use it when people must see and use the page while the panel is open.
  • Use boundary with a ref to keep the panel inside a map, a canvas, or a video.
  • Use persistKey to keep the place, the size, and the stage for the next visit.
  • For a task that must end before people go on, use a Dialog.
  • For a small popup next to a button, use a Popover.
  • For a panel that slides in from an edge, use a Drawer.
Arrow keysOn the grip: moves the panel 10px. On a resize edge: changes the size.
ShiftArrow keysOn the grip: moves the panel 50px.
HomeorEndOn the grip: moves the panel to the start or the end edge of the boundary.
EscapeCloses the front panel.
Open and close
popup · fades and scales from 95% at the center
Stage change
panel · the size and the corners move to the pill, the full size, or back
Front and back
hover · the shadow grows on the front panel and on a dragged panel

Built with

Installs with Floating Panel

Components
Button,Drawer
  1. AddedFloating Panel, with Button, Drawer.
Open the release