Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,29 @@ Visit: https://react.nodegui.org for docs.

- https://blog.logrocket.com/electron-alternatives-exploring-nodegui-and-react-nodegui/ - Electron alternatives: Exploring NodeGUI and React NodeGUI by [Siegfried Grimbeek](https://blog.logrocket.com/author/siegfriedgrimbeek/).

## SVG

React NodeGUI can render inline SVG trees by serializing SVG-like React components and rendering the result with Qt's SVG widget.

```jsx
import React from "react";
import { Renderer, Svg, Rect, Circle, Path, Window } from "@nodegui/react-nodegui";

const App = () => (
<Window>
<Svg width={160} height={120} viewBox="0 0 160 120">
<Rect x={10} y={10} width={140} height={100} rx={12} fill="#20242a" />
<Circle cx={80} cy={60} r={28} fill="#61dafb" />
<Path d="M68 60l9 9 18-22" fill="none" stroke="#20242a" strokeWidth={8} />
</Svg>
</Window>
);

Renderer.render(<App />);
```

For complete SVG documents, pass `src`, `buffer`, or `content` to `Svg`.

**Talks/Podcasts**

- [NodeGui and React NodeGui at KarmaJS Nov 2019 meetup: https://www.youtube.com/watch?v=8jH5gaEEDv4](https://www.youtube.com/watch?v=8jH5gaEEDv4)
Expand Down
Loading