Button

A versatile, production-ready button system with 8 visual variants, 4 sizes, loading spinner states, icon slots, and spring tap feedback.

Visual Variants
Sizes & Interactive Loading

Installation

Add the component directly to your repository using shadcn CLI:

npx shadcn@latest add Surajmaurya1/easyui/button

API Reference

PropTypeDefaultDescription
variant'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'success' | 'link' | 'gradient''primary'Visual presentation style
size'sm' | 'md' | 'lg' | 'icon''md'Dimensions and typography scale
isLoadingbooleanfalseDisplays an animated spinner and disables user interaction
loadingTextstringundefinedOptional text displayed alongside the loading spinner
leftIconReact.ReactNodeundefinedIcon element placed before children
rightIconReact.ReactNodeundefinedIcon element placed after children
fullWidthbooleanfalseStretches button to 100% width of parent container
disabledbooleanfalsePrevents interaction and applies 30% disabled opacity