Button
A customizable button component with multiple variants and sizes
Loading...
npx shadcn@latest add https://ui.sikka.io/r/button.json
npx shadcn@latest add https://ui.sikka.io/r/button.json
pnpm dlx shadcn@latest add https://ui.sikka.io/r/button.json
bunx --bun shadcn@latest add https://ui.sikka.io/r/button.json
Loading...
Variants
The Button component comes with several style variants:
default: Primary button stylelight: Light background with primary textdestructive: Red background for destructive actionsoutline: Border with transparent backgroundsecondary: Secondary color schemeghost: Minimal hover effectlink: Text link stylecombobox: Special style for comboboxesneoBrutalism: Bold neo-brutalism design
Available Sizes
default: Standard button size (h-10 with balanced padding)heightless: Flexible height with consistent horizontal paddingxs: Extra small buttons for compact interfacessm: Small buttons for secondary actionslg: Large buttons for primary actionsxl: Extra large buttons for high-emphasis actionsicon: Square buttons for icon-only contentsmallIcon: Compact square buttons for small icons
Features
Loading State
<Button isLoading>Loading...</Button>The loading state automatically shows:
- Dots pulse animation for normal buttons
- Spinner animation for icon buttons
- Appropriate colors based on variant
Centering
<Button centered={false}>Left Aligned</Button>By default buttons center their content. Set centered={false} to align left.
Usage
import { Button } from "@/components/naseem-ui/elements/button"
export default function Example() {
return (
<div className="flex flex-col gap-4">
<Button variant="default">Default</Button>
<Button variant="destructive">Delete</Button>
<Button variant="outline">Outline</Button>
<Button isLoading>Loading</Button>
</div>
)
}Props
Prop
Type