Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <div class="accordian accordian--horizontal">
  <div class="accordian__item active">
    <h1 class="accordian__heading"><span class="arrow-right"></span>Day One</h1>
    <div class="accordian__body">
      <h3 class="text-left">Sunday&nbsp; <small class="text-right text-muted lead">April 6, 2019</small></h3>
      <div class="w-100"></div>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut blanditiis ex suscipit odio accusantium debitis, alias reiciendis ea dolore amet beatae quia est, vitae dolorem. Totam aliquid accusantium id qui. Lorem ipsum dolor sit amet, consectetur
        adipisicing elit. Sit at dolorem sint! Recusandae voluptas ducimus architecto earum iure et aliquam, non velit accusamus, illo voluptate, dolore eos in vitae nihil!</p>
      <div class="row text-center justify-content-around mt-4">
        <div class="col-md-6">
          <i class="fas fa-user-circle mt-1 sunset" data-fa-transform="grow-20"></i>
          <p class="mt-3"><strong>Daytime dress</strong> <br /><b class="aqua">Travel Attire</b></p>
        </div>
        <div class="col-md-6">
          <i class="fas fa-user-circle mt-1 jazzberry" data-fa-transform="grow-20"></i>
          <p class="mt-3"><strong>Evening dress</strong> <br /><b class="aqua">Resort Casual</b></p>
        </div>
      </div>
    </div>
  </div>
  <div class="accordian__item">
    <h1 class="accordian__heading"><span class="arrow-right"></span>Day Two</h1>
    <div class="accordian__body animated fadeIn">
      <h3 class="text-left">Monday&nbsp; <small class="text-right text-muted lead">April 7, 2019</small></h3>
      <div class="w-100"></div>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut blanditiis ex suscipit odio accusantium debitis, alias reiciendis ea dolore amet beatae quia est, vitae dolorem. Totam aliquid accusantium id qui. Lorem ipsum dolor sit amet, consectetur
        adipisicing elit. Sit at dolorem sint! Recusandae voluptas ducimus architecto earum iure et aliquam, non velit accusamus, illo voluptate, dolore eos in vitae nihil!</p>
      <div class="row text-center justify-content-around mt-4">
        <div class="col-md-6">
          <i class="fas fa-user-circle mt-1 sunset" data-fa-transform="grow-20"></i>
          <p class="mt-3"><strong>Daytime dress</strong> <br /><b class="aqua">Resort Casual</b></p>
        </div>
        <div class="col-md-6">
          <i class="fas fa-user-circle mt-1 jazzberry" data-fa-transform="grow-20"></i>
          <p class="mt-3"><strong>Evening dress</strong> <br /><b class="aqua">Resort Attire</b></p>
        </div>
      </div>
    </div>
  </div>
  <div class="accordian__item">
    <h1 class="accordian__heading"><span class="arrow-right"></span>Day Three</h1>
    <div class="accordian__body">
      <h3 class="text-left">Tuesday&nbsp; <small class="text-right text-muted lead">April 8, 2019</small></h3>
      <div class="w-100"></div>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut blanditiis ex suscipit odio accusantium debitis, alias reiciendis ea dolore amet beatae quia est, vitae dolorem. Totam aliquid accusantium id qui. Lorem ipsum dolor sit amet, consectetur
        adipisicing elit. Sit at dolorem sint! Recusandae voluptas ducimus architecto earum iure et aliquam, non velit accusamus, illo voluptate, dolore eos in vitae nihil!</p>
      <div class="row text-center justify-content-around mt-4">
        <div class="col-md-6">
          <i class="fas fa-user-circle mt-1 sunset" data-fa-transform="grow-20"></i>
          <p class="mt-3"><strong>Daytime dress</strong> <br /><b class="aqua">Resort Casual</b></p>
        </div>
        <div class="col-md-6">
          <i class="fas fa-user-circle mt-1 jazzberry" data-fa-transform="grow-20"></i>
          <p class="mt-3"><strong>Evening dress</strong> <br /><b class="aqua">Resort Elegant</b></p>
        </div>
      </div>
    </div>
  </div>
  <div class="accordian__item">
    <h1 class="accordian__heading"><span class="arrow-right"></span>Day Four</h1>
    <div class="accordian__body">
      <h3 class="text-left">Wednesday&nbsp; <small class="text-right text-muted lead">April 9, 2019</small></h3>
      <div class="w-100"></div>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut blanditiis ex suscipit odio accusantium debitis, alias reiciendis ea dolore amet beatae quia est, vitae dolorem. Totam aliquid accusantium id qui. Lorem ipsum dolor sit amet, consectetur
        adipisicing elit. Sit at dolorem sint! Recusandae voluptas ducimus architecto earum iure et aliquam, non velit accusamus, illo voluptate, dolore eos in vitae nihil!</p>
      <div class="row text-center justify-content-around mt-4">
        <div class="col-md-6">
          <i class="fas fa-user-circle mt-1 sunset" data-fa-transform="grow-20"></i>
          <p class="mt-3"><strong>Daytime dress</strong> <br /><b class="aqua">Resort Casual</b></p>
        </div>
        <div class="col-md-6">
          <i class="fas fa-user-circle mt-1 jazzberry" data-fa-transform="grow-20"></i>
          <p class="mt-3"><strong>Evening dress</strong> <br /><b class="aqua">Resort Attire</b></p>
        </div>
      </div>
    </div>
  </div>
  <div class="accordian__item">
    <h1 class="accordian__heading"><span class="arrow-right"></span>Day Five</h1>
    <div class="accordian__body">
      <h3 class="text-left">Thursday&nbsp; <small class="text-right text-muted lead">April 10, 2019</small></h3>
      <div class="w-100"></div>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut blanditiis ex suscipit odio accusantium debitis, alias reiciendis ea dolore amet beatae quia est, vitae dolorem. Totam aliquid accusantium id qui. Lorem ipsum dolor sit amet, consectetur
        adipisicing elit. Sit at dolorem sint! Recusandae voluptas ducimus architecto earum iure et aliquam, non velit accusamus, illo voluptate, dolore eos in vitae nihil!</p>
      <div class="row text-center justify-content-around mt-4">
        <div class="col-md-6">
          <i class="fas fa-user-circle mt-1 sunset" data-fa-transform="grow-20"></i>
          <p class="mt-3"><strong>Daytime dress</strong> <br /><b class="aqua">Travel Attire</b></p>
        </div>
      </div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                $aqua: #62cbc9;
$obsidian: #443635;
$sunset: #E07C00;
$jazzberry: #AA0061;
$white: #ffffff;
$base-font-size: 16px;
$base-font-family: sans-serif;

.aqua {color:$aqua;}
.jazzberry {color: $jazzberry;}
.sunset {color: $sunset;}
h3 {color: $obsidian;}

.accordian {
  display: flex;
  height: 400px;
  max-width: 600px;
  font-size: $base-font-size * 0.9;

  &--horizontal {
    .accordian {
      &__item {
        width: 50px;
        display: flex;
        position: relative;
        border-top: 2px $aqua solid;
        border-bottom: 2px $aqua solid;
        

        ul {
          list-style-type: none;
          
          li {
            margin: 0 0 15px 0;
            line-height: 1.2;
          }
        }

        &:last-of-type {
          border-right: 2px $aqua solid;
        }

        &:not(active) {
          border-left: 2px $white solid;
        }

        &:first-child {
          border-left: none;
        }
      }

      &__heading {
        color: $white;
        max-width: 60px;
        height: 100%;
        writing-mode: vertical-lr;
        margin: 0px;
        cursor: pointer;
      }

      &__body {
        min-width: calc(590px - 272px);
        overflow: hidden;
        color: $obsidian;
      }
    }
  }

  &__item {
    flex-grow: 0;
    transition: flex-grow 0.25s ease-in;
    overflow: hidden;
    background-color: $white;

    &.active {
      flex-grow: 1;
    }
  }

  &__heading {
    font-family: $base-font-family;
    font-size: 1.8rem;
    line-height: 0.75;
    padding: 1rem;
    background-color: $aqua;
  }

  &__body {
    padding: 1rem;
    color: $white;
  }
}

              
            
!

JS

              
                $(".accordian__item").on("click", function() {
  $(this)
    .addClass("active")
    .siblings()
    .removeClass("active");
});

              
            
!
999px

Console