Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <div class="section">
  <div class="container">

    <div class="has-text-centered">
      <h1 class="title">Bulma + Alpine JS Loop</h1>
    </div>

    <div class="grid py-6" x-data="{}">
      <div class="columns is-multiline is-flex-mobile">
        <template x-for="(user, index) in users" :key="index">
          <div class="column is-4">
            <div class="box has-text-centered">
              <figure class="image is-64x64">
                <img class="is-rounded" :src="user.photo">
              </figure>
              <div class="py-4">
                <h3 x-text="user.name">Alex B.</h3>
                <p x-text="user.position">Software Engineer</p>
              </div>
              <a class="button">
                Hire Now
              </a>
            </div>
        </template>

      </div>
    </div>
  </div>

</div>
</div>
              
            
!

CSS

              
                $font: "Roboto", sans-serif;
$primary: #4e1b96;
$text: #97a1c9;

h1 {
  font-family: $font;
}

.grid {
  max-width: 940px;
  margin: 0 auto;
}

.box {
  border: 1px solid #ededed;

  figure {
    margin: 0 auto;
  }

  h3 {
    font-family: $font;
  }

  p {
    font-family: $font;
    font-size: 0.9rem;
    color: $text;
  }

  .button {
    font-family: $font;
    min-width: 110px;
    border-radius: 0.75rem;
    transition: all 0.3s;

    &:hover {
      background: $primary;
      border-color: $primary;
      color: #fff;
    }
  }
}

              
            
!

JS

              
                const users = [
  {
    photo:
      "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ7y3Z1KmRcTWjevKLfro5sVhQAGhdjt7ifDw&usqp=CAU",
    name: "Alex B.",
    position: "Software Engineer"
  },
  {
    photo:
      "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSQ_u-gnmeOdsfZMOpBTzqqcnBZwo8dWu38-Q&usqp=CAU",
    name: "Claudia C.",
    position: "Software Engineer"
  },
  {
    photo:
      "https://media.nngroup.com/media/people/photos/DSC02880-5.jpg.600x600_q75_autocrop_crop-smart_upscale.jpg",
    name: "Miranda B.",
    position: "Sales Manager"
  },
  {
    photo:
      "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTlQBG3l--K5nc9j9Q2rOI3F2aLBlGlkMUZAg&usqp=CAU",
    name: "Mike D.",
    position: "CTO"
  },
  {
    photo:
      "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRLe5PABjXc17cjIMOibECLM7ppDwMmiDg6Dw&usqp=CAU",
    name: "John V.",
    position: "Marketing Associate"
  },
  {
    photo:
      "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRZ2deIjGHBybec2nxndF_VstcGL_qLpomozw&usqp=CAU",
    name: "Adam F.",
    position: "Finance Consultant"
  }
];

              
            
!
999px

Console