Glin UI
Signature / Molecule

Floating Panel

Draggable glass panel with depth shadows and optional close button.

Homepage draft

Drag the inspector anywhere on the canvas. It keeps its place while you edit the page.

Inspector

StatusPublished
OwnerAK

Installation$

Install from
pnpm dlx @glinui/cli@latest add floating-panel

Prefer 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 more

plain

Crisp on any stage.

Learn more

solid

Crisp on any stage.

Learn more

glass

Opt-in. Needs a backdrop.

Learn more
import { 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 more

success

The effect color follows the tone token.

Learn more

warning

The effect color follows the tone token.

Learn more

danger

The effect color follows the tone token.

Learn more

info

The effect color follows the tone token.

Learn more
import { 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
Revenue$48.2k+12.4%
Active teams1,284+4.1%
Deploys9,310+18%
Recent activity
Maya shipped v2.4just now
Build 8812 passedjust now
Sam invited 3 teammatesjust now
// 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$

PropTypeRequiredDefaultDescription
closablebooleanNofalseShow close button
defaultXnumberNo0Initial x position
defaultYnumberNo0Initial y position
draggablebooleanNotrueEnable dragging
onClose() => voidNo-Close callback
widthnumber | stringNo320Panel width

Source$

import { FloatingPanel } from "@glinui/ui"
packages/ui/src/components/floating-panel.tsx

Generated API Snapshot

Beta

Auto-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

PropTypeRequiredDefaultDescription
closablebooleanNofalseShow close button
defaultXnumberNo0Initial x position
defaultYnumberNo0Initial y position
draggablebooleanNotrueEnable dragging
onClose() => voidNo-Close callback
widthnumber | stringNo320Panel width