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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              mixin content_1()
  h3 Lorem ipsum dolor sit amet
  p Lorem ipsum dolor sit amet consectetur, adipisicing elit. Blanditiis explicabo porro, voluptatum laborum cumque molestiae quibusdam accusamus sed, quam sint ducimus libero distinctio? Dolore laborum, quos dolorem recusandae deleniti quasi.

  h1 Accordion

    expander(title='base expander:rightToLeft')
    expander(title='expander animation:leftToRight', animation='leftToRight')
    expander(title='expander animation:bounceIn', animation='bounceIn')
    expander(title='expander animation:bottomToTop', animation='bottomToTop')
  position relative
  &:before {
      transition: opacity .1s linear, transform .5s ease-in-out;
      position: absolute;
      border-bottom: 1px solid currentColor;
      content: '';
      width: 100%;
      left: 0;
      bottom: -1px;
  &:not(:hover)::before {
      transform: scaleX(0);
      opacity: 0;

  background: #fff;
  box-shadow: 0 1px 12px 1PX rgba(0,0,0,0.25);
  overflow: hidden;  

    cursor pointer
    padding .7rem .5rem
    border-bottom 1px solid #efefef

      color #477dca
      //color #777
      border-bottom-color #477dca

      transition transform 0.2s cubic-bezier(0.23, 1, 0.32, 1)
        stroke tomato
        transform rotate(180deg)

    padding 1rem 1.5rem
    background #eff0f2 //#dee2e6 //#f1f1f1

  animation rightToLeft .5s;
  animation rightToLeft .5s reverse
@keyframes rightToLeft
    transform: translateX(100vw)
    transform: translateX(-2em)
    transform: translateX(0)

  animation leftToRight .5s;
  animation leftToRight .5s reverse
@keyframes leftToRight
    transform: translateX(-100vw)
    transform: translateX(2em)
    transform: translateX(0)

  animation bounceIn .3s;
  animation bottomToTop .2s reverse
@keyframes bounceIn {
  to {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  0% {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  20% {
    transform: scale3d(1.1, 1.1, 1.1);
  40% {
    transform: scale3d(0.9, 0.9, 0.9);
  60% {
    opacity: 1;
    transform: scale3d(1.03, 1.03, 1.03);
  80% {
    transform: scale3d(0.97, 0.97, 0.97);
  to {
    opacity: 1;
    transform: scale3d(1, 1, 1);

  animation bottomToTop .5s forwards;
  animation bottomToTop .5s reverse
@keyframes bottomToTop
    opacity 0
    transform: translateY(100%)
    transform: translateY(0)
              Vue.component("Expander", {
  template: `
<div class="Expander">
    <div class="Expander__trigger" 
          width="40" height="12" 
            <polyline points="12,2 20,10 28,2" stroke-width="3" fill="none"></polyline>
        {{ title }}
    <transition :name="animation">
        <div class="Expander__body" v-show="open">
  props: {
    title: {
      type: String,
      default: 'title'
    animation: {
      type: String,
      default: 'rightToLeft'
      // validator: prop => ['leftToRight', 'bounceIn', 'bottomToTop'].includes(prop)
  data() {
    return {
      open: false

const vm = new Vue({
  el: "#app",
  data: {
  computed: {
  methods: {
  mounted() {
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.