Code
<script lang="ts">
import { TreeView } from 'sv5ui-plus';
const data = [
{
id: '1', label: 'src', icon: 'lucide:folder',
children: [
{ id: '1-1', label: 'app.html', icon: 'lucide:file' }
]
}
];
</script>
<TreeView items={data} />
TreeView
A component for displaying hierarchical data in a collapsible tree structure.
Usage
Pass an array of TreeItem objects to the items prop. Each
item must have an id and label.
src
package.json