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.


<aside id="sidebar"></aside>
<div class="gutter"></div>
  <div id="viewDiv"></div>




html, body {
  height: 100vh;
  width: 100vw;
  margin: 0px;
  font-family: 'Roboto', sans-serif;

body {
  display: grid; /* enables CSS grid */
  grid-template-columns: 340px auto 1fr;
  grid-template-rows: 100px calc(100vh - 100px);

header {
  grid-column: 1 / span 3;
  font-size: 80px;
  padding: 10px;
  overflow: hidden;

aside {
  grid-column: 1;

.gutter {
  grid-column: 2;
  background-image: url('data:image/svg+xml,%3Csvg%20version=%221.1%22%20id=%22Layer_1%22%20xmlns=%22;%22%20xml:space=%22preserve%22%3E%3Cstyle%20type=%22text/css%22%3E.st0%7Bfill:%23D4D4D4;%7D%3C/style%3E%3Cg%3E%3Crect%20x=%220.5%22%20y=%220.5%22%20class=%22st0%22%20width=%221%22%20height=%2219%22/%3E%3Cpath%20d=%22M1,1v18V1%20M2,0H0v20h2V0L2,0z%22/%3E%3C/g%3E%3Cg%3E%3Crect%20x=%224.5%22%20y=%220.5%22%20class=%22st0%22%20width=%221%22%20height=%2219%22/%3E%3Cpath%20d=%22M5,1v18V1%20M6,0H4v20h2V0L6,0z%22/%3E%3C/g%3E%3C/svg%3E');
  background-repeat: no-repeat;
  background-position: center;
  width: 7px;
  margin-right: 2px;
  cursor: col-resize;

main {
  grid-column: 3;

/* Tell the map control to take 100% of its container: */
#viewDiv {
  height: 100%;
  width: 100%;


                // Don't like require()? Try ESM version:
], function(MapView, Directions, Split) {
  // Use split-grid to enable the draggable gutter
  // See the "Settings > HTML" of this codepen to see
  // how we load this in using dojo AMD packages
    columnGutters: [{
      track: 1,
      element: document.querySelector(".gutter")

  // 2D:
  var view = new MapView({
    container: "viewDiv",
    map: {
      basemap: "streets-vector"
    center: [-101.17, 35],
    zoom: 4

  var directionsWidget = new Directions({
    view: view,
    container: document.getElementById('sidebar'),
    // Point the URL to a valid route service that uses an
    // ArcGIS Online hosted service proxy instead of the default service
    // code from