Button
The Button component provides users with the ability to trigger actions and make choices with a single tap.
Import
<script>
import { Button } from 'svelte-fluentui';
</script>
svelte
Basic Usage
<Button>Click me</Button>
svelte
Variants
Primary Button
<Button variant="primary">Primary Action</Button>
svelte
Secondary Button
<Button variant="secondary">Secondary Action</Button>
svelte
Outline Button
<Button variant="outline">Outline Button</Button>
svelte
Properties
Property | Type | Default | Description |
---|---|---|---|
variant | 'primary' | 'secondary' | 'outline' | 'secondary' | Button style variant |
disabled | boolean | false | Whether the button is disabled |
size | 'small' | 'medium' | 'large' | 'medium' | Button size |
Events
Event | Description |
---|---|
on:click | Fired when the button is clicked |