Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <!DOCTYPE html>
<html lang="en">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<!-- Dependencies -->
		<link href="" rel="stylesheet">
		<script src=""></script>
		<script src=""></script>
		<script src=""></script>
		<!-- Tamarack -->
		<link href="" rel="stylesheet">	
		<script src=""></script>




                var doc = new tkDocument("Tabs Demo");
doc.padding = "1rem";

var notebook = new tkNotebook();
notebook.padding = "1rem";
notebook.newestTabActive = true;

var backButton = new tkButton("<", tkWidgetStyle.DANGER);
backButton.on("click", function() {

var nextButton = new tkButton(">", tkWidgetStyle.DANGER);
nextButton.on("click", function() {;
var addTabButton = new tkButton("Add Tab");
var tabsCreated = 1;
addTabButton.on("click", function() {
	var page = new tkNotebookPage("Page " + tabsCreated,"page" + tabsCreated);
	page.content.addElement(say("Page " + tabsCreated));

var removeTabButton = new tkButton("Remove Tab");
removeTabButton.on("click", function() {
	if ( 

var currentTabText = new tkText("h3", "No tab selected");
notebook.on("activeChanged", function() {
	if (notebook.pageCount > 0)
		currentTabText.text = + " is selected."
		currentTabText.text = "No tab selected";

doc.add(addTabButton, removeTabButton, backButton, nextButton, currentTabText, notebook);