svelte-headless-button Svelte Themes

Svelte Headless Button

Simple button component without default style

Svelte Headless Button

Simple button component without default style.

Installation

You can install this package with npm or yarn

npm install svelte-headless-button
yarn add svelte-headless-button

Usage

<script>
import Button from 'svelte-headless-button';

function handleClick(e) {
    console.log('Clicked!');
}
</script>

<Button id="myButton" name="myButton" on:click={handleClick}>
    My Button
</Button>

Props

Name Value
id The button id
name The button name

Events

Event Note
click Click Event

Top categories

Loading Svelte Themes