Skip to content

Ndigo element foundation

Shared light-DOM custom-element base and the Zag.js machine controller.

Foundation library · behaviour

Terminal window
npx shadcn@latest add https://ndigo.dev/r/lib.json

To 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

See this component rendered live on the live examples page.

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.