@keenmate/svelte-treeview
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.2 • Public • Published

Svelte Treeview

The most elaborate treeview for svelte on earth (or even in our galaxy).

Features

  • load new nodes whne expanding
  • automatically expanding to given depth
  • customization of all object properties
  • checkboxes enabled on whole tree or based on property
  • recursive seletion mode, where leafes can be selected
  • build-in support for search

Instalation

install the package @keenmate/svelte-treeview using your favourite package manager.

Font awesome is required for expand/collapse icons.

Minimal usage

<script lang="ts">
	import { TreeView } from '$lib/index.js';

	let tree = [
		{ nodePath: 'animals', title: 'Animals', hasChildren: true },
    //...
		{ nodePath: 'animals.insects.butterflies', title: 'Butterflies' }
	];
</script>

<TreeView {tree} treeId="my-tree" let:node>
	{node.title}
</TreeView>

Readme

Keywords

none

Package Sidebar

Install

npm i @keenmate/svelte-treeview

Weekly Downloads

51

Version

1.0.0-beta.2

License

none

Unpacked Size

62.8 kB

Total Files

31

Last publish

Collaborators

  • benjaminhorne
  • themaikxx
  • ondrejvalenta