# Button Component Documentation ## Overview The Button component is a fundamental UI element used to trigger actions or events. It supports multiple visual styles, sizes, and states for different use cases like form submission, dialog opening, action cancellation, and delete operations. ## Props | Prop | Type | Default | Description | |------|------|---------|-------------| | `variant` | `'primary' \| 'secondary' \| 'destructive' \| 'ghost' \| 'link'` | `'primary'` | Visual appearance style | | `size` | `'sm' \| 'base' \| 'lg'` | `'base'` | Button dimensions | | `icon` | `boolean` | `false` | Optimizes spacing for icon-only buttons | | `asChild` | `boolean` | `false` | Uses Slot to render as child component | | ...button props | `ComponentProps<'button'>` | — | All standard HTML button attributes supported | ## Variants ### Primary The default style for main actions: ```jsx ``` ### Secondary Alternative action style: ```jsx ``` ### Destructive For dangerous operations like deletion: ```jsx ``` ### Ghost Subtle action style: ```jsx ``` ## Sizes ### Small ```jsx ``` ### Default ```jsx ``` ### Large ```jsx ``` ## Icon Buttons Use the `icon` prop to properly space icon-only buttons across different sizes and variants: ```jsx ``` ## States ### Disabled ```jsx ``` ## Type Definition ```typescript interface ButtonProps extends ComponentProps<"button">, VariantProps { asChild?: boolean; variant?: "primary" | "secondary" | "destructive" | "ghost" | "link"; size?: "sm" | "md" | "lg"; icon?: boolean; } ``` ## Usage Example ```jsx import { Button } from '@vuer-ai/vuer-uikit'; function MyComponent() { return (
); } ```