Components/Button
Binhlaig UI Component

Button

Accessible action buttons with variants, sizes, icons, loading states and full-width support.

Installation

Initialize Binhlaig UI once, then install Button with Native Beta or Shadcn Stable.

Initialize your project first

Native initialization creates binhlaig.json, lib/utils.ts, the UI directory, required CSS and dependencies.

Terminal
npx --yes binhlaig-ui@latest init
Recommended native installer
Terminal
npx binhlaig-ui@latest add button

Import

Import Button from your project UI directory.

TypeScript
import { Button } from "@/components/ui/button";

Usage

Use the default button for a primary action.

Variants

Choose a visual style that matches action priority and meaning.

Sizes

Use small, medium, large and extra-large button sizes.

Border Radius

Control the corner radius independently from size.

With Icons

Place an icon before or after the label.

Icon Only

Use accessible labels for compact icon-only actions.

Loading State

Disable interaction and show progress while an action runs.

Full Width

Fill the available width of the parent container.

Disabled State

Prevent interaction and communicate unavailable actions.

Update or Overwrite

Replace an existing local Button file with the latest registry version.

Back up custom changes first

The overwrite option replaces your current component source file.

Terminal
npx binhlaig-ui@latest add button --overwrite

API Reference

Properties available on the Binhlaig UI Button component.

PropTypeDefaultDescription
variant"default" | "secondary" | "outline" | "ghost" | "danger" | "destructive" | "success" | "warning" | "link""default"Controls the visual style.
size"sm" | "md" | "default" | "lg" | "xl" | "icon" | "iconSm" | "iconLg""md"Controls dimensions and typography.
radius"none" | "sm" | "md" | "lg" | "full""lg"Controls corner radius.
fullWidthbooleanfalseFills the parent width.
loadingbooleanfalseShows progress and disables interaction.
loadingTextstring—Label displayed while loading.
leftIconReact.ReactNode—Icon before the label.
rightIconReact.ReactNode—Icon after the label.
disabledbooleanfalsePrevents interaction.
classNamestring—Adds custom classes.
childrenReact.ReactNode—Content inside the button.