Primitives
Button
Primary action element with 4 variants, 3 sizes, and a loading state. Extends all native <button> attributes.
Preview
Installation
terminal
bash
npx @entrepta/cli@latest add button// Resolves dependencies, copies the source, and installs npm packages automatically.
Usage
button.tsx
tsx
import { Button } from "@/components/entrepta/button"
<Button>./projects.sh →</Button>
<Button variant="secondary">$ npx @entrepta/cli@latest init</Button>
<Button variant="ghost">cat contact.txt</Button>
<Button variant="command">npx @entrepta/cli@latest add button</Button>
<Button size="sm" loading>Loading…</Button>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "primary" | "secondary" | "ghost" | "command" | "primary" | Visual style variant |
| size | "sm" | "md" | "lg" | "md" | Height and padding scale |
| loading | boolean | false | Shows spinner and disables the button |
| asChild | boolean | false | Delegates rendering to child via Radix Slot |