We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8465d3d commit 66eb7aaCopy full SHA for 66eb7aa
1 file changed
website/docs/api/interfaces/imageprops.md
@@ -4,6 +4,28 @@ title: "ImageProps"
4
sidebar_label: "ImageProps"
5
---
6
7
+The Image component provides the ability to render images. It is based on
8
+[NodeGui's QPixmap](https://docs.nodegui.org/docs/api/generated/classes/qpixmap).
9
+## Example
10
+```javascript
11
+import React from "react";
12
+import { Renderer, Image, Window } from "@nodegui/react-nodegui";
13
+import { AspectRatioMode } from "@nodegui/nodegui";
14
+const App = () => {
15
+ return (
16
+ <Window>
17
+ <Image
18
+ aspectRatioMode={AspectRatioMode.KeepAspectRatio}
19
+ size={{ height: 200, width: 150 }}
20
+ src="https://place-hold.it/200x150"
21
+ ></Image>
22
+ </Window>
23
+ );
24
+};
25
+Renderer.render(<App />);
26
+
27
+```
28
29
## Hierarchy
30
31
↳ [TextProps](textprops.md)
0 commit comments