Button

Primary actions with variants and sizes.

Installation

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

Registry path

itsvigneshv/default-file-ui/button

Package import

import { Button } from "@default-file/ui/components/df-button"

Default

Primary action button.

Variants

All visual variants.

Sizes

Text button sizes from xs to lg.

With icon

Icon-only, plus leading and trailing icon slots.

Slots

Leading and trailing accept any node: badge, counter, close, avatar.

Properties

Primary actions with variants, sizes, and optional leading or trailing content.

Button

PropTypeDefaultNotes
variant"default" | "outline" | "secondary" | "ghost" | "destructive" | "link""default"Visual style of the button.
size"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg""default"Height and padding. Icon sizes are square icon-only controls.
leadingReactNodeContent before the label (for example an icon).
trailingReactNodeContent after the label.
disabledbooleanNon-interactive button.
classNamestringAdditional styles.
…button attributesButtonHTMLAttributesNative button props (type, onClick, aria-label, etc.).

dfButtonClass

Class helper for applying button styles to a non-button host.

PropTypeDefaultNotes
dfButtonClass(opts?: { variant?, size?, className? }) => stringBuilds the same class string Button uses internally.