Core
primitives.
Protocols, tasks, layers, selection, errors, and structured logging—without framework baggage.
- Typed main ↔ UI messaging
- Cancellable task lifecycles
- Serializable layer inspection
figma-primitives
A modern collection of typed primitives and utilities for plugin runtime, UI, and networking.
Use only what you need. Every entry point is focused, typed, and designed to stay out of your product's way.
Protocols, tasks, layers, selection, errors, and structured logging—without framework baggage.
figma-primitives
Small, composable bindings that keep your UI predictable, responsive, and easy to maintain.
figma-primitives/react
Run work in the background and communicate across your plugin without freezing the experience.
createNetworkClient()
Define your commands once. Keep state serializable. Let every task own its progress, cancellation, and outcome.
Install the package, choose the entry points your plugin needs, and keep your product logic where it belongs: in your app.
$ npm install figma-primitives
// Plugin runtime
import { createProtocol, createTaskEngine } from 'figma-primitives'
// Optional React UI
import { TaskProvider, useTasks } from 'figma-primitives/react'
Small pieces. Explicit boundaries. A better starting point.