extends ../../layouts/LayoutComponent include ../../mixins/components/Treeview append variables - var pageHeader = { title: 'Treeview', description: 'Treeview is a visual portrayal of hierarchical data that starts with the root item and progresses through its children and their descendants. Aside from the root, every item has a parent and can have children. To create this Treeview, we used Bootstrap’s “Collapse” feature.', } var treeviewItems = [ { name: 'public', id:'1-1', children:[ { name: 'assets', id:'2-1', children:[ { name: 'image', id:'3-1', show:true, children:[ { name: 'falcon.png', icon: 'fas fa-image text-success', dot:'info' }, { name: 'generic.png', icon: 'fas fa-image text-success', dot:'primary' }, { name: 'shield.svg', icon: 'fas fa-sun text-warning', dot:'primary' }, ] }, { name: 'video', id:'3-2', badge:3, show:true, children:[ { name: 'beach.mp4', icon: 'fas fa-play text-danger', dot:'warning' }, { name: 'background.mp4', icon: 'fas fa-play text-danger', dot:'warning' } ] }, { name: 'js', id:'3-3', badge:2, children:[ { name: 'theme.js', icon: 'fab fa-js text-success' }, { name: 'theme.min.js', icon: 'fab fa-js text-success' }, ] }, ] }, { name:'dashboard', id:'2-3', children:[ { name: 'default.html', icon: 'fab fa-html5 text-danger', }, { name: 'analytics.html', icon: 'fab fa-html5 text-danger', }, { name: 'crm.html', icon: 'fab fa-html5 text-danger', }, ] }, { name: 'index.html', icon: 'fab fa-html5 text-danger', }, ] }, { name: 'Files', id:'1-2', show:true, children:[ { name: 'build.zip', icon: 'fas fa-file-archive text-warning' }, { name: 'live-1.3.4.zip', icon: 'fas fa-file-archive text-warning' }, { name: 'app.exe', icon: 'fas fa-file text-primary', dot:'warning' }, { name: 'export.csv', icon: 'fas fa-file text-primary', dot:'primary' }, { name: 'default.pdf', icon: 'fas fa-file-pdf text-danger', dot:'primary' }, { name: 'Yellow_Coldplay.wav', icon: 'fas fa-music text-info' }, ] }, { name:'package.json', icon:'fab fa-node-js text-success' }, { name:'package-lock.json', icon:'fab fa-node-js text-success' }, { name:'README.md', icon:'fas fa-exclamation-circle text-primary' }, ] block component +PageHeader(pageHeader) .row.g-3.mb-3 .col-xxl-6 +ComponentCard({ title: 'Basic Example', anchor: true, descriptionEl:`
Use data-show="true" attribute with the collapse element to expand the tree at first.
Use treeview-stripe class and data-options='{"striped":true}' to make a striped treeview.
Use treeview-slect class and data-options='{"select":true}' to make a selectable treeview.
Use treeview-stripe and treeview-slect both class and data-options='{"select":true,"striped":true}' to make a selectable and striped treeview.