sterling-svelte  1.0.12
A modern, accessible, lightweight UI component library for Svelte.
Exciting News! sterling-svelte 2.0 is out and built on Svelte 5! Read all about it here!

Button

A <button>: an interactive element activated to perform an action

Code
<script lang="ts">
  import { Button } from '@geoffcox/sterling-svelte';
</script>

<Button>
  <SterlingIcon/>sterling-svelte
</Button>

Members

Property Name Type Default Comment
variant string '' Additional class names to apply

Considerations

  • The type prop default is 'button' rather than 'submit'
  • Includes HTMLButtonElement props, event, and methods

Anatomy

<button class="sterling-button">
  <slot {disabled} {variant} />
</button>