svelte-headless-button
v0.2.7
Published
Simple button component without default style.
Downloads
23
Readme
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 |