Options Panel

Anchored panel chrome with titled header and open body/footer slots for tool options.

Installation

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

Registry path

itsvigneshv/default-file-ui/options-panel

Package import

import { OptionsPanel, OptionsPanelTrigger, OptionsPanelContent, OptionsPanelHeader, OptionsPanelTitle, OptionsPanelBody, OptionsPanelFooter } from "@default-file/ui/components/df-options-panel"

Default

Titled panel with open body and footer slots. Put any tool options inside.

Properties

Anchored options panel chrome with a titled header and open body/footer slots. Compose any sections or actions inside the slots. Nothing is hardcoded.

OptionsPanel

Root open state. Same API as Popover.

PropTypeDefaultNotes
openbooleanControlled open state.
defaultOpenbooleanUncontrolled initial open state.
onOpenChange(open: boolean) => voidCalled when open state changes.

OptionsPanelTrigger

PropTypeDefaultNotes
renderReactElementHost element that toggles the panel.
childrenReactNodeTrigger content when not using render.

OptionsPanelContent

Panel shell with options chrome defaults (content-sized width, end align, bottom side).

PropTypeDefaultNotes
side"top" | "bottom" | "left" | "right""bottom"Preferred placement side.
align"start" | "center" | "end""end"Alignment along the side.
sideOffsetnumber8Gap between trigger and panel.
matchTriggerWidthbooleanfalseLock the panel to the trigger width. Off by default so the panel sizes to its content.
portalbooleantrueWhen false, render the panel inline (docs demos). Default portals to document.body.
classNamestringOverride or extend the panel chrome styles.
childrenReactNodeCompose OptionsPanelHeader, OptionsPanelBody, and OptionsPanelFooter.

Header, body, and footer slots

Pure layout regions. Put any controls in body; any actions or meta in footer.

PropTypeDefaultNotes
OptionsPanelHeaderdiv attrsHeader region with bottom border. Usually wraps the title.
OptionsPanelTitleh2 attrsPanel title text.
OptionsPanelBodydiv attrsScrollable body slot. Fully swappable for sections, selects, and custom nodes.
OptionsPanelFooterdiv attrsFooter slot with top border. Fully swappable for buttons, status, and meta.