Pen Settings



CSS Base

Vendor Prefixing

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


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.


    div.card-carousel--nav__left(@click="moveCarousel(-1)" :disabled="atHeadOfList")
        div.card-carousel-cards(:style="{ transform: 'translateX' + '(' + currentOffset + 'px' + ')'}")
          div.card-carousel--card(v-for="item in items")
            img(:src="'' + + '/200/200'" :alt="")
            div.card-carousel--card--footer {{ }}
    div(class="card-carousel--nav__right" @click="moveCarousel(1)" :disabled="atEndOfList")


  margin: 0
  padding: 0
  box-sizing: border-box
  display: flex
  min-height: 100vh
  align-items: center
  justify-content: center
  background: #eee

  display: flex
  align-items: center
  justify-content: center
  margin: 20px 0 40px

  display: flex
  justify-content: center
  width: 640px
    overflow: hidden
    display: inline-block
    width: 15px
    height: 15px
    padding: 10px
    box-sizing: border-box
    border-top: 2px solid #000
    border-right: 2px solid #000
    cursor: pointer
    margin: 0 20px
    transition: transform .8s cubic-bezier(0.430, 0.195, 0.020, 1.000)
      opacity: 0.2
      border-color: black
    transform: rotate(-135deg)
      transform: rotate(-135deg) scale(0.9)

    transform: rotate(45deg)
      transform: rotate(45deg) scale(0.9)

  white-space: nowrap
  transition: transform .8s cubic-bezier(0.430, 0.195, 0.020, 1.000)
  transform: translatex(0px)
    width: 200px
    display: inline-block
    vertical-align: top
    margin: 0 10px
    background-color: #fff
      margin-left: 0
      margin-right: 0
      display: block
      width: 100%
      height: auto
      padding: 10px


                class Item {
  constructor(name) { = name

Vue.component("carousel", {
  template: "#carousel",
  data() {
    return {
      currentOffset: 0,
      windowSize: 2,
      paginationFactor: 220,
      items: [
        new Item('1'),
        new Item('2'),
        new Item('3'),
        new Item('4'),
        new Item('5'),
        new Item('6'),
        new Item('7'),
        new Item('8'),
        new Item('9')
  computed: {
    atEndOfList() {
      return this.currentOffset <= (this.paginationFactor * -1) * ((this.items.length - 1) - this.windowSize)
    atHeadOfList() {
      return this.currentOffset === 0
  methods: {
    moveCarousel(direction) {
      if (direction === 1 && !this.atEndOfList) {
        this.currentOffset -= this.paginationFactor
      } else if (direction === -1 && !this.atHeadOfList) {
        this.currentOffset += this.paginationFactor

new Vue({