@nuvo-js/core 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,6 +17,10 @@ Nuvo provides a class-based approach to building web interfaces without JSX or u
|
|
|
17
17
|
- **No JSX required** — Build interfaces using standard JavaScript and TypeScript.
|
|
18
18
|
- **Lightweight** — Built around native browser APIs.
|
|
19
19
|
|
|
20
|
+
## Demo
|
|
21
|
+
|
|
22
|
+
🌐 Live demo: https://example-ten-opal.vercel.app
|
|
23
|
+
|
|
20
24
|
## Installation
|
|
21
25
|
|
|
22
26
|
Install using npm:
|
|
@@ -87,19 +91,22 @@ The `.dom` property provides access to the underlying native DOM element.
|
|
|
87
91
|
You can specify the native HTML element type using generics:
|
|
88
92
|
|
|
89
93
|
```typescript
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
|
|
95
|
+
const button = new Element<HTMLButtonElement>({
|
|
96
|
+
tagName: 'button',
|
|
92
97
|
props: {
|
|
93
|
-
|
|
98
|
+
children: ['Click me']
|
|
94
99
|
}
|
|
95
100
|
});
|
|
96
101
|
|
|
97
|
-
const
|
|
98
|
-
tagName: '
|
|
102
|
+
const div = new Element<HTMLDivElement>({
|
|
103
|
+
tagName: 'div',
|
|
99
104
|
props: {
|
|
100
|
-
|
|
105
|
+
className: 'container',
|
|
106
|
+
children:[button.dom]
|
|
101
107
|
}
|
|
102
108
|
});
|
|
109
|
+
|
|
103
110
|
```
|
|
104
111
|
|
|
105
112
|
This provides better TypeScript support when working with native DOM elements.
|