Skip to content

Commit 7c2d69e

Browse files
committed
docs(readme): document refs, onNodeMount, and element-specific usage 🍋
- Add Form UX (label for, inputmode, enterkeyhint) and SVG/accessibility examples - Add Image, Responsive images (picture/srcset/sizes), iframe, and Links (anchor) sections - Add Refs and lifecycle section with refs, onNodeMount, and AbortController examples - Document RenderOptions and validation errors in API and type reference - Update Quick Start and API table for render(schema, container, options?)
1 parent 98319e2 commit 7c2d69e

2 files changed

Lines changed: 258 additions & 30 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ npm install @neabyte/schema2ui
4848

4949
## Quick Start
5050

51-
Define a tree with `root` (array of nodes). Each node has `type` (HTML tag name), optional `layout`, `style`, `attrs`, `content`, and `children`. Call `create(definition)` then `render(schema, container)`.
51+
Define a tree with `root` (array of nodes). Each node has `type` (HTML tag name), optional `layout`, `style`, `attrs`, `content`, and `children`. Call `create(definition)` then `render(schema, container)`. For refs and lifecycle (events, dialog, focus), use `render(schema, container, { refs, onNodeMount })` — see [USAGE](USAGE.md#refs-and-lifecycle).
5252

5353
```typescript
5454
import { create, render } from '@neabyte/schema2ui'
@@ -120,7 +120,7 @@ render(schema, document.getElementById('app'))
120120

121121
## Documentation
122122

123-
- **[USAGE.md](USAGE.md)**Full API and type reference.
123+
- **[USAGE.md](USAGE.md)** — API and type reference.
124124
- **[examples/](examples/)** — Browser demo: build then open `examples/index.html`.
125125

126126
## Build & Test

0 commit comments

Comments
 (0)