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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

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


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


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.






 * Deep merge two or more objects into the first.
 * (c) 2019 Chris Ferdinandi, MIT License,
 * @param   {Object} objects  The objects to merge together
 * @returns {Object}          Merged values of defaults and options
var deepAssign = function () {

	// Make sure there are objects to merge
	var len = arguments.length;
	if (len < 1) return;
	if (len < 2) return arguments[0];

	// Merge all objects into first
	for (var i = 1; i < len; i++) {
		for (var key in arguments[i]) {
			// If it's an object, recursively merge
			// Otherwise, push to key
			if ([i][key]) === '[object Object]') {
				arguments[0][key] = deepAssign(arguments[0][key] || {}, arguments[i][key]);
			} else {
				arguments[0][key] = arguments[i][key];

	return arguments[0];


var obj1 = {
	sandwich: 'chicken',
	condiment: 'mayo',
	desert: true,
	days: {
		monday: true,
		wednesday: true,
		friday: true

var obj2 = {
	sandwich: 'tuna',
	chips: 'Cape Cod',
	desert: false,
	days: {
		monday: false,
		tuesday: true,
		thursday: true

var shallow = Object.assign({}, obj1, obj2);
var deep = deepMerge(obj1, obj2);