Modular action bar with configurable slots and dividers for tool chrome.
Add this item from the registry, or import it from the package after installing Default File UI.
Registry path
itsvigneshv/default-file-ui/floating-controlsPackage import
import { FloatingControls, FloatingControlsItem, FloatingControlsDivider, FloatingControlsSlot } from "@default-file/ui/components/df-floating-controls"Surface bar with text actions and a divider after Reset.
Always-dark glass for tool canvases. It does not follow light or dark page theme — use surface for themeable chrome.
Build the bar from an items array. Place dividers anywhere, swap divider content, or drop in custom nodes.
Modular action bar with items, dividers, and slots. Pass children or an items array.
| Prop | Type | Default | Notes |
|---|---|---|---|
| variant | "surface" | "overlay" | "surface" | Bar surface treatment. |
| items | FloatingControlsEntry[] | — | Declarative entries (item, divider, slot). Ignored when children are passed. |
| children | ReactNode | — | Compose FloatingControlsItem, Divider, and Slot manually. |
| className | string | — | Additional styles on the bar. |
| Prop | Type | Default | Notes |
|---|---|---|---|
| leading | ReactNode | — | Leading icon or mark. |
| trailing | ReactNode | — | Trailing icon or mark. |
| tone | "ghost" | "solid" | "ghost" | Item emphasis. |
| label / children | ReactNode | — | Item label content. |
| …button attributes | ButtonHTMLAttributes | — | Native button props (onClick, aria-label, etc.). |
| Prop | Type | Default | Notes |
|---|---|---|---|
| children | ReactNode | — | Optional custom divider content; default is a rule. |
| className | string | — | Additional styles. |
| Prop | Type | Default | Notes |
|---|---|---|---|
| children | ReactNode | — | Freeform slot for custom controls. |
| className | string | — | Additional styles. |
When using the declarative items prop.
| Prop | Type | Default | Notes |
|---|---|---|---|
| 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. |