Floating Controls

Modular action bar with configurable slots and dividers for tool chrome.

Installation

Add this item from the registry, or import it from the package after installing Default File UI.

Registry path

itsvigneshv/default-file-ui/floating-controls

Package import

import { FloatingControls, FloatingControlsItem, FloatingControlsDivider, FloatingControlsSlot } from "@default-file/ui/components/df-floating-controls"

Default

Surface bar with text actions and a divider after Reset.

Overlay

Always-dark glass for tool canvases. It does not follow light or dark page theme — use surface for themeable chrome.

Items API

Build the bar from an items array. Place dividers anywhere, swap divider content, or drop in custom nodes.

Properties

Modular action bar with items, dividers, and slots. Pass children or an items array.

FloatingControls

PropTypeDefaultNotes
variant"surface" | "overlay""surface"Bar surface treatment.
itemsFloatingControlsEntry[]Declarative entries (item, divider, slot). Ignored when children are passed.
childrenReactNodeCompose FloatingControlsItem, Divider, and Slot manually.
classNamestringAdditional styles on the bar.

FloatingControlsItem

PropTypeDefaultNotes
leadingReactNodeLeading icon or mark.
trailingReactNodeTrailing icon or mark.
tone"ghost" | "solid""ghost"Item emphasis.
label / childrenReactNodeItem label content.
…button attributesButtonHTMLAttributesNative button props (onClick, aria-label, etc.).

FloatingControlsDivider

PropTypeDefaultNotes
childrenReactNodeOptional custom divider content; default is a rule.
classNamestringAdditional styles.

FloatingControlsSlot

PropTypeDefaultNotes
childrenReactNodeFreeform slot for custom controls.
classNamestringAdditional styles.

items[] entry shapes

When using the declarative items prop.

PropTypeDefaultNotes
Item entry{ leading?, trailing?, tone?, label?, … }Maps to FloatingControlsItem.
Divider entry{ type: "divider", children? }Inserts a divider between items.
Slot entry{ type: "slot", children }Inserts a custom slot.