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

PropertyTypeDefaultDescription
variant'primary' | 'secondary' | 'outline''secondary'Button style variant
disabledbooleanfalseWhether the button is disabled
size'small' | 'medium' | 'large''medium'Button size

Events

EventDescription
on:clickFired when the button is clicked