Button

A flexible button component with multiple variants and sizes.

PREVIEW

INSTALLATION

bash
# Required
npm install @kennbalino/kui

# Optional — only if you want to use CVA, cn(), or lucide icons directly
npm install class-variance-authority clsx tailwind-merge lucide-react

USAGE

tsx
import { Button } from "@kennbalino/kui";

// Variants
<Button variant="solid">Solid</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="danger">Danger</Button>
<Button variant="muted">Muted</Button>

// Sizes
<Button size="sm">Small</Button>
<Button size="md">Medium</Button>
<Button size="lg">Large</Button>

// Disabled
<Button disabled>Disabled</Button>

PROPS

PropTypeDefaultDescription
variantsolid | ghost | danger | mutedsolidControls the visual style of the button.
sizesm | md | lgmdControls the size of the button.
disabledbooleanfalseDisables the button and prevents interaction.
onClick() => voidCallback fired when the button is clicked.
typebutton | submit | resetbuttonHTML button type attribute.
classNamestringAdditional CSS classes to apply.
children*ReactNodeContent rendered inside the button.