Skip to content
Marc Espín Sanz edited this page Mar 30, 2020 · 5 revisions

The Tab constructor refers to the tabs you open inside the editor. For example, when you open a file it opens a tab.

You can use the tab constructor to show your own content inside a tab.

This will open a tab, with Hello World as content:

function entry(API){
	
	const myComponent = API.puffin.element(`
		<p>Hello World</p>
	`)
	
	new API.Tab({
		title:'My tab',
		component:myComponent
	})
}

You must pass an object with the title property and the main component.

Properties:

  • component: refers to the puffin component you want to display
  • title: refers to the title displayed in the tab it self
  • panel (optional): open the tab in a custom panel rather to the current focused one

Documentation

Tutorials

Contributing

About

Clone this wiki locally