A collection of headless components for svelte 5
Yarn / npm / pnpm (package name from package.json):
npm install @dle.dev/ember
# or
pnpm add @dle.dev/ember
Peer dependency: Svelte 5.
A small, headless, accessible and highly-customizable nestable tree component for Svelte. The implementation stores children in a Record keyed by id, enabling O(1) lookups within a node’s children. Helper functions are provided for toggling, inserting, updating and deleting nodes.
getPathToNodeById and then performs structural cloning to update/insert/delete nodes immutably. See src/lib/ember/tree/utils.ts for the full implementations.onMount the component normalizes nodes to ensure expanded is set to a boolean.Scripts available in package.json:
npm run dev — starts Vite dev server for the demo site.npm run build — builds the demo and packages the svelte component.npm run test — runs unit tests (vitest).npm run check — runs type/svelte checkers.PRs and issues welcome. Please keep changes small and add tests.
MIT — see License.md.