Skip to content

Cross-platform components (code to Figma/React Native) #744

@macintoshhelper

Description

@macintoshhelper

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:

image

(using the existing Primer components code with few changes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    fr-skipRemove this from the Design Systems first responder list

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions