Hi, it would be great to use styled-components/primitives for cross-platform support for the components, with react-figma as a primary use-case of this (similar to react-sketchapp, but for Figma). I‘ve submitted a PR as an initial proof-of-concept/demo: #745 .
The idea is to support these platforms using react-primitives:
- Web (
react-dom)
- Figma (
react-figma)
- React Native (
react-native)
- Sketch (
react-sketchapp)
The main thinking behind this, is to render Figma components direct from the code, using the styled-components styles as a source-of-truth.
This is inspired by a similar project here: https://github.com/react-figma/PrimerDemo . My idea is to integrate this workflow directly into this library, using the existing styling code/logic 🙂.
Here's a demo of what I have so far:

(using the existing Primer components code with few changes)
Hi, it would be great to use
styled-components/primitivesfor cross-platform support for the components, withreact-figmaas a primary use-case of this (similar toreact-sketchapp, but for Figma). I‘ve submitted a PR as an initial proof-of-concept/demo: #745 .The idea is to support these platforms using
react-primitives:react-dom)react-figma)react-native)react-sketchapp)The main thinking behind this, is to render Figma components direct from the code, using the
styled-componentsstyles as a source-of-truth.This is inspired by a similar project here: https://github.com/react-figma/PrimerDemo . My idea is to integrate this workflow directly into this library, using the existing styling code/logic 🙂.
Here's a demo of what I have so far:
(using the existing Primer components code with few changes)