npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@liquiddom/vue

v0.2.0-rc.0

Published

Vue 3 bindings for liquiddom

Downloads

89

Readme

@liquiddom/vue

Vue 3.4+ bindings for liquiddom — WASM-driven soft-body physics on real DOM elements.

Install

npm install liquiddom @liquiddom/vue vue

liquiddom is a peer dependency so a single WASM instance is shared across your app.

Quickstart

<script setup lang="ts">
import { LiquidProvider, LiquidElement } from "@liquiddom/vue";
</script>

<template>
  <LiquidProvider :config="{ capacity: 16, theme: { fusionRadius: 50 } }">
    <LiquidElement as="button">Click me</LiquidElement>
    <LiquidElement as="a" href="#">Also liquid</LiquidElement>
  </LiquidProvider>
</template>

Three usage patterns

1. <LiquidElement> — drop-in tag

Easiest. Wraps useLiquidRef and observes on mount.

<LiquidElement as="button" :liquid-type="4 /* Shake */">
  Shaky
</LiquidElement>

2. useLiquidRef — template ref on your own element

When you need full control over the element.

<script setup lang="ts">
import { useLiquidRef } from "@liquiddom/vue";

const cardRef = useLiquidRef<HTMLDivElement>({ liquidType: 3 /* Dragged */ });
</script>

<template>
  <div ref="cardRef" class="my-card">Drag me</div>
</template>

3. useLiquid — imperative access

For one-off actions like impulse(), tween(), spawnDroplet().

<script setup lang="ts">
import { useLiquid, useLiquidRef } from "@liquiddom/vue";

const liquid = useLiquid();
const buttonRef = useLiquidRef<HTMLButtonElement>();

function splash() {
  if (liquid.value && buttonRef.value) {
    liquid.value.impulse(buttonRef.value, { magnitude: 20 });
  }
}
</script>

<template>
  <button ref="buttonRef" @click="splash">Splash me</button>
</template>

Plugin install (alternative to <LiquidProvider>)

import { createApp } from "vue";
import { LiquidPlugin } from "@liquiddom/vue";
import App from "./App.vue";

createApp(App)
  .use(LiquidPlugin, { capacity: 16 })
  .mount("#app");

The plugin attaches the instance app-wide; useLiquid() works without a surrounding <LiquidProvider>. The plugin monkey-patches app.unmount for cleanup.

API

| Export | Description | |--------|-------------| | <LiquidProvider :config> | Owns a LiquidDOMInstance via provide/inject. config captured once on mount. | | LiquidPlugin | Alternative install via app.use(LiquidPlugin, config?). | | useLiquid() | Returns Ref<LiquidDOMInstance \| null>. Reactive — updates when async create resolves. | | useLiquidRef<T>(opts?) | Template ref that auto-observes / unobserves across lifecycle. Internal watch uses flush: "post" so the element is mounted before observe fires. | | <LiquidElement :as :liquid-type ...attrs> | Convenience tag. Uses inheritAttrs: false + manual spread so class/style/events/data-* forward correctly. |

Notes

  • SSR-safe — provider effect gated on typeof window; useLiquidRef's watch doesn't fire on the server.
  • No .vue SFC dependency in the package — adapter is pure TypeScript using h() render functions, so it can be consumed without vite-plugin-vue configured for node_modules.
  • liquidType is captured at first attach:liquid-type="reactive" looks reactive but is read once. Change requires re-mount.

Full options + imperative API

All options and methods exposed via :config and useLiquid() come straight from liquiddom's core API.

License

MIT © Dennis Schmock