# @figspec/react

> React binding for figspec

Latest version **2.0.1** (published 2025-03-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @figspec/react
pnpm add @figspec/react
yarn add @figspec/react
bun add @figspec/react
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2025-03-11 |
| First published | 2020-12-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | pockawoooh |
| Keywords | figma, react |

## Links

- npm: https://www.npmjs.com/package/@figspec/react
- Repository: https://github.com/pocka/figspec-react
- Homepage: https://github.com/pocka/figspec-react#readme
- Issues: https://github.com/pocka/figspec-react/issues
- npm.io page: https://npm.io/package/@figspec/react

## Dependencies (2)

- [@lit-labs/react](https://npm.io/package/@lit-labs/react.md) ^2.0.0
- [@figspec/components](https://npm.io/package/@figspec/components.md) ^2.0.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2025-03-11
- 1.0.4 (release-1.x) — 2025-03-11
- 2.0.0 — 2023-09-06
- 1.0.3 — 2022-10-16
- 1.0.2 — 2022-07-02
- 1.0.1 — 2022-04-16
- 1.0.0 — 2021-09-23
- 0.1.6 — 2021-05-16
- 0.1.5 — 2021-01-15
- 0.1.4 — 2020-12-27
- 0.1.3 — 2020-12-27
- 0.1.2 — 2020-12-27
- 0.1.1 — 2020-12-25

## README

# @figspec/react

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![npm](https://img.shields.io/npm/v/@figspec/react?label=%40figspec%2Freact)](https://www.npmjs.com/package/@figspec/react)

A React binding for [`@figspec/components`](https://github.com/pocka/figspec).

## Installation

```sh
# npm
$ npm i @figspec/react

# Yarn
$ yarn add @figspec/react

# pnpm
$ pnpm add @figspec/react
```

## Usage

See the docs at `@figspec/components`.

This bindings enables you to use the CustomElement's property via React's component props.
You don't need to use kebab-case attributes :camel::dash:

```jsx
import { FigspecViewer } from "@figspec/react";

const logSelectedNode = (ev) => {
  console.log(ev.detail.selectedNode);
};

<FigspecFrameViewer
  nodes={nodes}
  renderedImage={renderedImage}
  zoomMargin={200}
  onNodeSelect={logSelectedNode}
/>;
```

---
_Source: https://npm.io/package/@figspec/react · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
