Pen Settings



CSS Base

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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


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.


                <!-- Use preprocessors via the lang attribute! e.g. <template lang="pug"> -->
  <div id="app">
    <h1>With Vue and "open" class</h1>
    <div class="toggle">
      <button @click="toggle">Toggle SlideIn</button>

    <!-- Add open class if state is set to open  -->
    <div class="slidein" :class="open ? 'open' : ''">
      <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Incidunt cum, harum, quaerat porro, maiores facilis molestias illum impedit quo repellat enim provident perspiciatis molestiae in saepe id cupiditate eveniet asperiores.</p>
        <button class="close-btn" @click="toggle"> X </button>

export default {
  data() {
    return {
      open: false
  methods: {
    toggle() { = !; 

/* Make slide in box hidden off screen with fixed positioning 100% to the right */
.slidein {
  max-width: 600px;
  padding: 2em 3em; 
  position: fixed; 
  z-index: 100;
  top: 0;
  right: -100%;
  background: #ddd;
  height: 100%;
  box-shadow: 1px 1px 10px rgba(0,0,0,.5);
  transition: all .5s ease-in-out; 

/* Set positioning back to 0 when toggled opened */
.open {
  right: 0; 

/* add a close button in case toggle button is hidden on smaller screens */
.close-btn {
  border: none; 
  font-weight: bold; 
  font-size: 2em; 
  background: transparent; 
  position: absolute; 
  top: 0;
  left: 0;
  padding: .5em;

/* General styles unrelated to slide in */
body {
  font-family: 'Mulish', sans-serif;

.toggle {
  margin: 1em;

button {
  padding: .5em 1em;
  border-radius: 3em;
  font-size: 1.1em;

h1 {
  font-weight: 200;