Skip to content

Add SVG component support#389

Open
jamilahmadzai wants to merge 1 commit into
nodegui:masterfrom
jamilahmadzai:issue-31-svg-components
Open

Add SVG component support#389
jamilahmadzai wants to merge 1 commit into
nodegui:masterfrom
jamilahmadzai:issue-31-svg-components

Conversation

@jamilahmadzai
Copy link
Copy Markdown

@jamilahmadzai jamilahmadzai commented May 24, 2026

Summary:

  • Add an Svg root component backed by QSvgWidget.
  • Serialize SVG-like React children to XML and re-render on prop or child updates.
  • Export common shape components (Rect, Circle, Path, G, Group, and others) plus SvgText for SVG text without conflicting with the existing Text component.
  • Support full SVG documents through src, buffer, or content.
  • Document the inline SVG API in the README.

Acceptance coverage:

  • Implements the MVP discussed in issue Support for svg in React code. #31 by generating SVG XML and loading it through Qt SVG rendering.
  • Avoids a separate plugin dependency because @nodegui/nodegui already exports QSvgWidget.
  • Supports the common chart/icon primitives needed for inline SVG-style React trees.

IssueHunt: https://oss.issuehunt.io/r/nodegui/react-nodegui/issues/31
Payment: IssueHunt bounty-platform payout to GitHub user @jamilahmadzai.

Fixes #31

Validation:

  • yarn build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for svg in React code.

1 participant