Enhance Figma-to-HTML conversion with auto-layout and SVG support#25
Merged
trmquang93 merged 2 commits intomainfrom Apr 6, 2026
Merged
Enhance Figma-to-HTML conversion with auto-layout and SVG support#25trmquang93 merged 2 commits intomainfrom
trmquang93 merged 2 commits intomainfrom
Conversation
…t support The @grida/refig factory drops all auto-layout properties when converting kiwi binary to REST API format. This caused pasted Figma frames to render with no flex layout, children stacked at (0,0), and gradients silently dropped. Changes: - parseFigmaClipboard.js: Extend factory.node monkey-patch to copy 13 auto-layout properties (stackMode, stackSpacing, padding, alignment, etc.) from raw kiwi nodeChanges onto factory output - figmaToHtml.js: New converter — Figma node tree to HTML/CSS with support for auto-layout/flex, relativeTransform positions, linear gradients (both kiwi and REST formats), text styling, fills, strokes, corner radii, opacity, and nested frames - useFigmaPaste.js: Use HTML conversion pipeline instead of WASM renderer for higher-fidelity output; support multi-frame paste - ModalsLayer.jsx: Improve paste feedback toast styling - figmaToHtml.test.js: 11 tests covering auto-layout, position, gradients, text, fills, and corner radius
…for absolute-positioned children
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve the Figma-to-HTML paste functionality by restoring support for auto-layout properties, gradients, and adding SVG rendering for vector nodes. This update enhances the fidelity of pasted frames and improves user feedback during the paste process.