Pen Settings



CSS Base

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

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.


Auto Save

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.


                <!-- Use preprocessors via the lang attribute! e.g. <template lang="pug"> -->
  <div id="app">
    <div ref="dropdown" class="dropdown">
      <strong class="dropdown-label" @click="show = !show">
        Click me to open!
      <p class="dropdown-content" v-if="show">
        Sea of Tranquility a mote of dust suspended in a sunbeam hundreds of
        thousands concept of the number one realm of the galaxies radio
        telescope. As a patch of light descended from astronomers two ghostly
        white figures in coveralls and helmets are softly dancing emerged into
        consciousness Orion's sword encyclopaedia galactica. Another world bits
        of moving fluff network of wormholes muse about network of wormholes
        with pretty stories for which there's little good evidence and billions
        upon billions upon billions upon billions upon billions upon billions
        upon billions.

<script setup>
import autoAnimate from "";
import { ref, onMounted } from "vue";

const dropdown = ref(); // we need a DOM node
const show = ref(false);

onMounted(() => {
  const el = dropdown.value;
  autoAnimate(el, {
    // Animation duration in milliseconds (default: 250)
    duration: 250,
    // Easing for motion (default: 'ease-in-out')
    easing: "ease-in-out",
    // When true, this will enable animations even if the user has indicated
    // they don’t want them via prefers-reduced-motion.
    disrespectUserMotionPreference: false

<style lang="scss">
.dropdown {
  border: 2px solid #cbcbcb;
  border-radius: 0.5em;
  background-color: #fff;
  margin-bottom: 2em;
strong {
  display: block;
  padding: 1em;
  cursor: pointer;
p {
  margin: 1em;
  font-weight: 300;
  line-height: 1.5;