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.svelte

Usage

<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

PropTypeDefaultDescription
variant'default' | 'destructive' | 'outline' | 'ghost''default'Visual style of the button
size'sm' | 'md' | 'lg''md'Size of the button
disabledbooleanfalseWhether the button is disabled

Files