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.


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.


                <div id="app">
 <button class="button" @click="showModal = true">
  Show Modal
 <transition name="fade" appear>
  <div class="modal-overlay" v-if="showModal" @click="showModal = false"></div>
 <transition name="slide" appear>
  <div class="modal" v-if="showModal">
   <h1>Lorem Ipsum</h1>
   <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem provident explicabo accusamus laudantium voluptatum nobis sed nesciunt neque possimus molestiae?</p>
   <button class="button" @click="showModal = false">
    Close Modal


                * {
 margin: 0;
 padding: 0;
 box-sizing: border-box;

body {
 font-family: 'montserrat', sans-serif;

#app {
 position: relative;
 display: flex;
 justify-content: center;
 align-items: center;
 width: 100vw;
 min-height: 100vh;
 overflow-x: hidden;

.button {
 appearance: none;
 outline: none;
 border: none;
 background: none;
 cursor: pointer;
 display: inline-block;
 padding: 15px 25px;
 background-image: linear-gradient(to right, #CC2E5D, #FF5858);
 border-radius: 8px;
 color: #FFF;
 font-size: 18px;
 font-weight: 700;
 box-shadow: 3px 3px rgba(0, 0, 0, 0.4);
 transition: 0.4s ease-out;
 &:hover {
  box-shadow: 6px 6px rgba(0, 0, 0, 0.6);

.modal-overlay {
 position: absolute;
 top: 0;
 left: 0;
 right: 0;
 bottom: 0;
 z-index: 98;
 background-color: rgba(0, 0, 0, 0.3);

.modal {
 position: fixed;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
 z-index: 99;
 width: 100%;
 max-width: 400px;
 background-color: #FFF;
 border-radius: 16px;
 padding: 25px;
 h1 {
  color: #222;
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 15px;
 p {
  color: #666;
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 15px;

.fade-leave-active {
 transition: opacity .5s;

.fade-leave-to {
 opacity: 0;

.slide-leave-active {
 transition: transform .5s;

.slide-leave-to {
 transform: translateY(-50%) translateX(100vw);


                new Vue({
 el: '#app',
 data () {
  return {
   showModal: true