Skip to content
项目

关于

[不再维护] Svelte 工具集框架 💡 当前状态:87 个工具。

网站与应用开发

这些数字如何统计

可以做什么

  • 🎪 Interactive docs & demos
  • ⚡ Fully tree shakeable: Only take what you want, [bundle size]
  • 🦾 Type Strong: Written in TypeScript, with TS Docs
  • 🔋 SSR Friendly

实测星标增长

24小时
0
7天
0
15天
-2
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

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.

License

MIT

探索相关项目

加载中…