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


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.


  <div class="container">
    <div class="inner-container">
      <div v-for="(item, i) in items" :key="i">
        <div :key="i" :ref="`item${i + 1}`" class="item">
          <h2 class="heading">Slide {{ i + 1 }}</h2>
          <p class="content">{{ item }}</p>

import gsap from "";

export default {
  data: () => ({
    items: [
      "Quasi qui eos aut magni doloribus labore.",
      "Totam incidunt reiciendis veritatis dolore est dicta fuga asperiores.",
      "Et nam eaque quas incidunt expedita delectus harum.",
      "Dolorem nihil et facilis velit."
    currentStep: 1

  mounted() {    
    let tl = gsap.timeline({repeat: -1, defaults: {duration: 1}});
    this.items.forEach((cur, i) => {
      let item = this.$refs[`item${i+1}`];
      tl.set(item, {display: "block"})
        .from(item, {
          yPercent: 50,
          autoAlpha: 0,
          skewX: -6,
          skewY: 6
      .to(item, {
        delay: 2,
        yPercent: -50,
        autoAlpha: 0,
        skewX: -6,
        skewY: 6

<style lang="scss">
.container {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 150px;
  transform: translate(-50%, -50%);
  background-color: #382ca0;
  padding: 20px;
.inner-container {
  position: relative;
  width: 100%;
  height: 100%;
.item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #fff;
  display: none;
.heading {
  text-align: center;