toggle
/
4.6.2
toggle 4.6.2
Install from the command line:
Learn more about npm packages
$ npm install @dusk-network/toggle@4.6.2
Install via package.json:
"@dusk-network/toggle": "4.6.2"
About this version
npm i -D @dusk-network/toggle
<script>
import Toggle from "@dusk-network/toggle";
let value = false;
const type = "switch";
let variant = "brand";
function onChange() {
//Runs on triggered event
}
function onClick() {
//Runs on triggered event
}
</script>
<Toggle
type="{type}"
name="switch"
id="switch"
variant="{variant}"
value="{value}"
on:change="{onChange}"
on:click="{onClick}"
/>