Floating Panel
Draggable glass panel with depth shadows and optional close button.
pnpm dlx @glinui/cli@latest add floating-panelHomepage draft
Drag the inspector anywhere on the canvas. It keeps its place while you edit the page.
Inspector
Installation$
pnpm dlx @glinui/cli@latest add floating-panelPrefer the package?
Usage$
FloatingPanel is a "use client" component. Place it inside a relative container. Drag to reposition.
Drag either panel inside its container. The default surface is the glinr lift look with elevation 3, so it reads on any backdrop.
Examples$
Variants$
glinr is the default, plain is the flat shadcn look, solid is a neutral tonal face and glass is opt-in. Glass needs a backdrop, so the set below sits on a vivid one.
glinr
Crisp on any stage.
Learn moreplain
Crisp on any stage.
Learn moresolid
Crisp on any stage.
Learn moreglass
Opt-in. Needs a backdrop.
Learn moreimport { FloatingPanel } from "@glinui/ui"
// Omit variant to follow the ambient style (glinr by default).export function FloatingPanelVariants() {return ( <> <FloatingPanel variant="glinr"> ... </FloatingPanel> <FloatingPanel variant="plain"> ... </FloatingPanel> <FloatingPanel variant="solid"> ... </FloatingPanel> <FloatingPanel variant="glass"> ... </FloatingPanel> </>)}Colors$
Tones apply through the soft variant.
accent
The effect color follows the tone token.
Learn moresuccess
The effect color follows the tone token.
Learn morewarning
The effect color follows the tone token.
Learn moredanger
The effect color follows the tone token.
Learn moreinfo
The effect color follows the tone token.
Learn moreimport { FloatingPanel } from "@glinui/ui"
export function FloatingPanelTones() {return ( <FloatingPanel variant="soft" tone="success"> ... </FloatingPanel>)}In a layout$
Panels rendered statically (className="static") inside a dashboard row.
Overview
Last 7 days// Panels rendered statically (className="static") inside a dashboard row.import { FloatingPanel } from "@glinui/ui"
export function FloatingPanelLayout() {return ( <section className="grid gap-4 sm:grid-cols-3"> ... </section>)}Accessibility$
- Close button has
aria-label="Close panel". - Drag interaction uses Pointer Events API for broad device support.
- Interactive elements inside the panel (buttons, links) are not affected by drag.
Reduced Motion$
No animation is used, drag is position-based, not animated.
API Reference$
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
closable | boolean | No | false | Show close button |
defaultX | number | No | 0 | Initial x position |
defaultY | number | No | 0 | Initial y position |
draggable | boolean | No | true | Enable dragging |
onClose | () => void | No | - | Close callback |
width | number | string | No | 320 | Panel width |
Source$
import { FloatingPanel } from "@glinui/ui"Generated API Snapshot
Beta
Generated API Snapshot
BetaAuto-extracted from TypeScript source in packages/ui/src/components/floating-panel.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.
Generated: 2026-10-08T01:41:21.546Z · Full index: /docs/api-metadata
Primary Props Type
FloatingPanelProps
FloatingPanelProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
closable | boolean | No | false | Show close button |
defaultX | number | No | 0 | Initial x position |
defaultY | number | No | 0 | Initial y position |
draggable | boolean | No | true | Enable dragging |
onClose | () => void | No | - | Close callback |
width | number | string | No | 320 | Panel width |