Skip to content

explorer

Marc Espín Sanz edited this page Jun 23, 2020 · 3 revisions

The Explorer constructor allows you to create a tree-like component:

function entry(API){
	
	const myContainer = document.getElementById() //DOM container
	
	const myExplorer = new API.Explorer({
		items: [
			{
				label: 'First item',
				items:[
					{
						label: 'Child 1',
						action(){
							console.log('Clicked child 1')
						}
					},
					{
						label: 'Child 2',
						action(){
							console.log('Clicked child 2')
						}
					}
				]
			}
		]
	})
	
	API.puffin.render(myExplorer, myContainer)	
}

Documentation

Tutorials

Contributing

About

Clone this wiki locally