Binhlaig logoBinhlaig UI
Components/Button
Binhlaig UI Component

Button

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

Installation

Install Button in your project.

Terminal
npx binhlaig-ui@latest add button

For project setup, installer selection, dependencies, and advanced installation instructions, see the Installation Guide.

View Installation Guide →Update or Overwrite →

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.

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.