Ndigo element foundation
Shared light-DOM custom-element base and the Zag.js machine controller.
Foundation library · behaviour
Install
Section titled “Install”npx shadcn@latest add https://ndigo.dev/r/lib.jsonTo use the shorter @ndigo/lib form, configure the namespace in components.json.
| Source | Target | Type |
|---|---|---|
registry/base/base-element.ts |
@lib/base-element.ts |
registry:lib |
registry/base/zag-element.ts |
@lib/zag-element.ts |
registry:lib |
registry/base/structure-element.ts |
@lib/structure-element.ts |
registry:lib |
Live example
Section titled “Live example”See this component rendered live on the live examples page.
Dependencies
Section titled “Dependencies”Packages: @zag-js/core@~1.47.0, @zag-js/vanilla@~1.47.0 (installed automatically).
Copy-in foundation for <nd-*> elements: the NdElement lifecycle base and createZagElement.