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.


                <nav id="layered-nav">
  <div class="main option">
  <div class="section primary-section option">
  <div class="section secondary-section option">
  <div class="section tertiary-section option">
  <div class="primary red option">
  <div class="primary yellow option">
  <div class="primary blue option">
  <div class="secondary green option">
  <div class="secondary orange option">
  <div class="secondary purple option">
  <div class="tertiary red-orange option">
  <div class="tertiary yellow-orange option">
  <div class="tertiary red-purple option">
  <div class="tertiary blue-purple option">
  <div class="tertiary blue-green option">
  <div class="tertiary yellow-green option">

<div id="back-button">



                /* Set the containing element to flex
 * with a flow of row wrap.
#layered-nav {
  display: flex;
  flex-flow: row wrap;

/* Everything below this comment exists 
 * purely for styling.

.option {
  height: 150px;
  width: 150px;
  color: #fff;
  text-align: center;
  border-radius: 50%;
  margin: 10px;

#back-button {
  margin-left: 50px;

h2 { padding-top: 40px; }

.section { background-color: #a9a9a9; }

/* Colors */
.red { background-color: red; }
.yellow { background-color: yellow; }
.blue { background-color: blue; }
.orange { background-color: orange; }
.green { background-color: green; }
.purple { background-color: purple; }
.red-orange { background-color: #FE6501; }
.yellow-orange { background-color: #FECC01; }
.red-purple { background-color: #B701DB; }
.blue-purple { background-color: #5601FF; }
.blue-green { background-color: #00CDCD; }
.yellow-green{ background-color: #3EFF01; }



                // First, we create a function to hide everything.
hideAll = function() {
  $( '.option' ).hide();

// Next we set the default behavior
$( document ).ready( function() {
  $( '.main' ).show();

// Then we set the behavior of our reset button
$( '#back-button' ).click( function() {
  $( '.main' ).show();

// Lastly, we set the click behavior of all of our options
$( '.main' ).click( function() {
  $( '.section' ).show();

$( '.primary-section' ).click( function() {
  $( '.primary' ).show();

$( '.secondary-section' ).click( function() {
  $( '.secondary' ).show();

$( '.tertiary-section' ).click( function() {
  $( '.tertiary' ).show();