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.


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.


  h1 Custom Carousel
  h6 ( click slides or press left & right arrow keys )
  a(href="" target="_blank")
    i(class='fab fa-github')
  a(href="" target="_blank")
    i(class='fab fa-twitter')
  a(href="" target="_blank")
    i(class='fab fa-codepen')
  a(href="" target="_blank")
    i(class='fab fa-linkedin')

  - for(var x = 0; x < 9; x++)



                flexbox(a, b)
  display flex
  align-items a
  justify-content b
gradient(a, b, c)
  background b
  background linear-gradient(a, b, c)
color1 = #2E5266
color2 = #6E8898
color3 = #9FB1BC
color4 = #D3D0CB

  min-height 100vh
  flexbox(center, center)
  gradient(to bottom, #ECE9E6, #FFF)
    width 100%
    flexbox(center, center)
    flex-direction column
    font-family 'Quicksand', sans-serif
    overflow-x hidden
    position relative
    top -2.5rem
      text-align center
      color color1
      margin-bottom 3rem
        margin-bottom 0
        margin 0
        margin 0
        color color1
        display inline-block
          margin-right 0.5rem
          font-size 1.5rem
          padding 0.5rem
          margin-top 0.5rem

  flexbox(center, center)
  position relative
    height 20rem
    width 12rem
    position relative
    z-index 1
    transform scale(0.6) translateY(-2rem)
    opacity 0
    cursor pointer
    pointer-events none
    gradient(to top, color1, color2)
    transition 1s
      content ''
      position absolute
      height 2px
      width 100%
      border-radius 100%
      background-color rgba(0,0,0,0.3)
      bottom -5rem
      filter blur(4px)
    for val, i in (1..10)
          content '' + i + ''
          position absolute
          top 50%
          left 50%
          transform translateX(-50%) translateY(-50%)
          font-size 3rem
          font-weight 300
          color white
    z-index 3
    transform scale(1) translateY(0) translateX(0)
    opacity 1
    pointer-events auto
    transition 1s
    z-index 2
    transform scale(0.8) translateY(-1rem) translateX(0)
    opacity 0.6
    pointer-events auto
    transition 1s


                $num = $('.ui-card').length;
$even = $num / 2;
$odd = ($num + 1) / 2;

if ($num % 2 == 0) {
  $('.ui-card:nth-child(' + $even + ')').addClass('active');
  $('.ui-card:nth-child(' + $even + ')').prev().addClass('prev');
  $('.ui-card:nth-child(' + $even + ')').next().addClass('next');
} else {
  $('.ui-card:nth-child(' + $odd + ')').addClass('active');
  $('.ui-card:nth-child(' + $odd + ')').prev().addClass('prev');
  $('.ui-card:nth-child(' + $odd + ')').next().addClass('next');

$('.ui-card').click(function() {
  $slide = $('.active').width();
  if ($(this).hasClass('next')) {
    $('.container').stop(false, true).animate({left: '-=' + $slide});
  } else if ($(this).hasClass('prev')) {
    $('.container').stop(false, true).animate({left: '+=' + $slide});
  $(this).removeClass('prev next');
  $(this).siblings().removeClass('prev active next');

// Keyboard nav
$('html body').keydown(function(e) {
  if (e.keyCode == 37) { // left
  else if (e.keyCode == 39) { // right