← Back to Home

Button

A flexible button component with 4 variants (primary, outline, ghost, danger), 3 sizes (sm, md, lg), loading states, and icon support.

Installation

npm install @thomarket/button

Usage Example

import { Button } from '@thomarket/button';

function App() {
  return (
    <Button variant="primary" size="md">
      Click me
    </Button>
  );
}

// With icons
<Button leftIcon={<PlusIcon />}>
  Add Item
</Button>

// Loading state
<Button loading>
  Submitting...
</Button>

Live Demo

Variants

Sizes

With Icons

States

Combined

Full Width

Icon Only

As Child (Link)