Primitree

React hooks

Typed React hooks for built design tokens or live Figma Variables API access.

npm install @primitree/hooks@next react@^19.0.0 swr@^2.3.7

@primitree/hooks requires Node.js 24 or newer and React ^19.0.0.

The package has two data paths:

  1. Local tokens read files from primitree build
  2. Live API hooks read or change variables through the Enterprise Variables REST API with SWR

Non-React usage

Framework-agnostic utilities live in @primitree/core, including the normalizer, fetcher, and diff functions.

On this page