Button
A versatile button component with multiple variants and sizes.
uiinteractive
Installation
Copy the component file into your project's src/lib/components/ directory.
templates/Button.svelteUsage
<script>
import Button from '$lib/components/Button.svelte';
</script>
<Button>Click me</Button>
<Button variant="outline">Outline</Button>
<Button variant="destructive" size="lg">Delete</Button>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | 'default' | 'destructive' | 'outline' | 'ghost' | 'default' | Visual style of the button |
| size | 'sm' | 'md' | 'lg' | 'md' | Size of the button |
| disabled | boolean | false | Whether the button is disabled |