svelte-toggle@1.0.0 • REPL • Svelte

PHOTO EMBED

Mon Oct 26 2020 11:39:34 GMT+0000 (Coordinated Universal Time)

Saved 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_copyCOPY

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