Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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.


                <base href="">

<script src="../webcomponentsjs/webcomponents-lite.js"></script>

<link rel="import" href="d2l-dropdown.html">
<link rel="import" href="d2l-dropdown-content.html">
<link rel="import" href="../d2l-menu/d2l-menu.html">
<link rel="import" href="d2l-dropdown-menu.html">

  d2l-dropdown {
    color: var(--d2l-color-ferrite);
    font-family: 'Lato', 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
    letter-spacing: 0.01rem;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.4rem;
  d2l-dropdown {
    margin-left: 15px;

<!-- Menu Content -->
  <button class="d2l-dropdown-opener">Menu Content</button>
  <d2l-dropdown-menu id="dropdown">
    <d2l-menu label="Astronomy">
      <d2l-menu-item text="Introduction" id="first-item"></d2l-menu-item>
      <d2l-menu-item text="Searching for the Heavens "></d2l-menu-item>
      <d2l-menu-item text="The Solar System">
          <d2l-menu-item text="Formation"></d2l-menu-item>
          <d2l-menu-item text="Modern Solar System"></d2l-menu-item>
          <d2l-menu-item text="Future Solar System"></d2l-menu-item>
          <d2l-menu-item text="The Planets">
              <d2l-menu-item text="Mercury"></d2l-menu-item>
              <d2l-menu-item text="Venus"></d2l-menu-item>
              <d2l-menu-item text="Earth"></d2l-menu-item>
              <d2l-menu-item text="Mars"></d2l-menu-item>
              <d2l-menu-item text="Jupiter"></d2l-menu-item>
              <d2l-menu-item text="Saturn"></d2l-menu-item>
              <d2l-menu-item text="Uranus"></d2l-menu-item>
              <d2l-menu-item text="Neptune"></d2l-menu-item>
              <d2l-menu-item text="Dwarf Planets"></d2l-menu-item>
          <d2l-menu-item text="The Sun"></d2l-menu-item>
          <d2l-menu-item text="Solar &amp; Lunar Eclipses"></d2l-menu-item>
          <d2l-menu-item text="Meteors &amp; Meteorites"></d2l-menu-item>
          <d2l-menu-item text="Asteroids"></d2l-menu-item>
          <d2l-menu-item text="Comets"></d2l-menu-item>
      <d2l-menu-item text="Stars &amp; Galaxies">
          <d2l-menu-item text="What is a Star?"></d2l-menu-item>
          <d2l-menu-item text="Lifecycle of a Star"></d2l-menu-item>
          <d2l-menu-item text="Binaries &amp; Multiples"></d2l-menu-item>
          <d2l-menu-item text="Star Clusters"></d2l-menu-item>
          <d2l-menu-item text="Star Death">
              <d2l-menu-item text="Supernovae"></d2l-menu-item>
              <d2l-menu-item text="Black Holes"></d2l-menu-item>
          <d2l-menu-item text="Star Clusters"></d2l-menu-item>
          <d2l-menu-item text="Galaxies">
              <d2l-menu-item text="Classification"></d2l-menu-item>
              <d2l-menu-item text="Birth &amp; Evolution"></d2l-menu-item>
              <d2l-menu-item text="Spiral"></d2l-menu-item>
              <d2l-menu-item text="Elliptical"></d2l-menu-item>
              <d2l-menu-item text="Lenticular"></d2l-menu-item>
              <d2l-menu-item text="Irregular"></d2l-menu-item>
              <d2l-menu-item text="Active &amp; Radio"></d2l-menu-item>
              <d2l-menu-item text="Quasars"></d2l-menu-item>
              <d2l-menu-item text="Galaxy Clusters"></d2l-menu-item>
      <d2l-menu-item text="The Night Sky">
          <d2l-menu-item text="Constellations"></d2l-menu-item>
          <d2l-menu-item text="Mapping the Heavens"></d2l-menu-item>
          <d2l-menu-item text="Reading Star Maps"></d2l-menu-item>
          <d2l-menu-item text="Telescopes"></d2l-menu-item>
      <d2l-menu-item text="The Universe" id="last-item"></d2l-menu-item>

<!-- Generic Content -->
  <button class="d2l-dropdown-opener">Generic Content</button>
  <d2l-dropdown-content max-width="400">
    <a href="">Google</a>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    <a href="">D2L</a>

<div class="vd-container"><div class="vd"><a target="_blank" href="">Check out dropdown on Vaadin Directory</a></div></div>