[NOT MAINTAINING ANYMORE] A framework for Svelte Utilities π‘ Current status: 87 utilities.
See the codeCollection of essential Svelte Composition Utilities
<script lang="ts">
import { counterStore } from "svelte-legos";
const { counter, inc, dec, set, reset } = counterStore();
</script>
<button on:click={() => inc()}>Increment</button>
{counter}
<button on:click={() => dec()}>Decrement</button>
<script lang="ts">
import { clickOutsideAction } from "svelte-legos";
let hidden = false;
function handleClickOutside() {
hidden = !hidden;
}
</script>
<div class="modal" use:clickOutsideAction on:clickoutside={handleClickOutside} />
Refer to functions list or documentations for more details.
npm i svelte-legos
npm run start:dev
This project is heavily inspired by the following awesome projects.
151 followers Β· starred Mar 2023
995 followers Β· starred Apr 2023
299 followers Β· starred Jul 2023
135 followers Β· starred Jun 2023
[NOT MAINTAINING ANYMORE] A framework for Svelte Utilities π‘ Current status: 87 utilities.
See the codeCollection of essential Svelte Composition Utilities
<script lang="ts">
import { counterStore } from "svelte-legos";
const { counter, inc, dec, set, reset } = counterStore();
</script>
<button on:click={() => inc()}>Increment</button>
{counter}
<button on:click={() => dec()}>Decrement</button>
<script lang="ts">
import { clickOutsideAction } from "svelte-legos";
let hidden = false;
function handleClickOutside() {
hidden = !hidden;
}
</script>
<div class="modal" use:clickOutsideAction on:clickoutside={handleClickOutside} />
Refer to functions list or documentations for more details.
npm i svelte-legos
npm run start:dev
This project is heavily inspired by the following awesome projects.
151 followers Β· starred Mar 2023
995 followers Β· starred Apr 2023
299 followers Β· starred Jul 2023
135 followers Β· starred Jun 2023