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

@dxtmisha/figma-ref

v0.1.1

Published

Vue 3 composables for Figma plugin development, providing reactive wrappers for Figma storage, selection, and node manipulation.

Downloads

222

Readme

@dxtmisha/figma-ref

npm version License: MIT

@dxtmisha/figma-ref is a collection of Vue 3 composables designed for Figma plugin development. It bridges the gap between the asynchronous Figma API and Vue's reactive system, allowing developers to create highly responsive and state-driven plugin interfaces.

Why this library?

Managing state in a Figma plugin can be challenging: you need to track canvas selections, sync data with persistent storage, and handle bidirectional messaging—all while keeping your UI in sync.

figma-ref solves this by wrapping these complex interactions into simple, reactive primitives. Instead of manually handling message events or polling for selection changes, you simply use a composable. The library manages the underlying @dxtmisha/figma communication and updates your Vue components automatically when the Figma state changes.

What does it do?

For Figma storage — provides useFigmaStorage and useFigmaClientStorage. These composables bind Figma's persistent data (node-level or plugin-level) to reactive Vue refs, making data persistence as easy as working with local state.

For selection trackinguseFigmaUiSelected and useFigmaFrameSelection allow your UI to react instantly as the user selects different nodes on the Figma canvas. They provide clean access to IDs, names, and types of selected elements.

For frame managementuseFigmaUiFrames simplifies working with top-level frames or specific hierarchies, providing a reactive list of nodes that can be used to build navigation or layers panels within your plugin UI.

For design-to-code and stylesuseFigmaFrameStyles facilitates fetching and reacting to CSS styles and JSON representations of Figma nodes, perfect for building style inspectors or export tools.

Installation

npm install @dxtmisha/figma-ref

Quick Start (Vue 3 Component)

<script setup>
import { useFigmaUiSelected, useFigmaStorage } from '@dxtmisha/figma-ref'

// 1. Reactively track selected frames
const { items: selectedItems } = useFigmaUiSelected()

// 2. Reactively manage plugin settings stored in Figma
const { value: settings, set: setSettings } = useFigmaStorage('user-settings')

const toggleTheme = () => {
  setSettings({ ...settings.value, dark: !settings.value.dark })
}
</script>

<template>
  <div>
    <h3>Selected: {{ selectedItems.length }}</h3>
    <ul>
      <li v-for="item in selectedItems" :key="item.id">{{ item.name }}</li>
    </ul>

    <button @click="toggleTheme">Toggle Theme</button>
  </div>
</template>

Principles

  • Vue-First Reactivity — every utility is a true Vue composable, utilizing ref, computed, and shallowRef for optimal performance.
  • Deep Integration — works seamlessly with the @dxtmisha/figma communication layer and @dxtmisha/figma-code backend abstraction.
  • Declarative State — encourages a declarative approach to plugin UI, where the interface is a direct function of the Figma canvas state.
  • Efficiency — handles resource cleanup and avoids memory leaks by leveraging Vue's lifecycle hooks for event subscriptions.

Documentation

Full API reference and guides:

📖 https://dxtmisha.github.io/dxt-ui/?path=/docs/dxtmisha-en-ui-figma-about-the-library--docs

License

MIT