toggleStore

Reactive boolean value with helper actions.

Demo

Value: OFF

Usage

<script lang="ts">
import { toggleStore } from "svelte-legos";

const { toggle, on, off, set, value } = toggleStore();

// Use $value as true or false and
// manipulate using toggle, on, off, set
</script>