0 points

svelte-toggle@1.0.0 • REPL • Svelte


dashboard

Mon Oct 26 2020 11:39:34 GMT+0000 (UTC)

Posted by @meisernator #svelte #javascript

<script>
  import Toggle from "svelte-toggle@1.0.0";

  let toggled = false;
</script>

<svelte:head>
	<!-- override REPL button margin rule -->
	<style>button{margin:0}</style>
</svelte:head>
        
<Toggle
  label="My toggle label"
  switchColor="#eee"
  toggledColor="#24a148"
  untoggledColor="#fa4d56"
  on="On"
  off="Off"
  bind:toggled />
content_copy Copy

https://svelte.dev/repl/hello-world?version