Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte-legos

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-legos

Collection of essential Svelte Composition Utilities

  • 0.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.1K
increased by4.63%
Maintainers
1
Weekly downloads
 
Created
Source

Svelte Legos

Collection of essential Svelte Composition Utilities

🚀 Features

  • 🎪 Interactive docs & demos
  • Fully tree shakeable: Only take what you want, [bundle size]
  • 🦾 Type Strong: Written in TypeScript, with TS Docs
  • 🔋 SSR Friendly
  • 🌎 No bundler required: Usable via CDN
  • 🔩 Flexible: Configurable event filters and targets

🦄 Usage

<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.

📦 Install

npm i svelte-legos

Local setup

npm run start:dev

🌸 Thanks

This project is heavily inspired by the following awesome projects.

FAQs

Package last updated on 19 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc