The most elaborate treeview for svelte on earth (or even in our galaxy).
install the package @keenmate/svelte-treeview
using your favourite package manager.
Font awesome is required for expand/collapse icons.
<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>