css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

              <!-- Bricklayer needs to have "bricklayer" class name. -->
<div class="bricklayer" id="my-bricklayer">
  <!-- You can put elements directly into the bricklayer container. Bricklayer will automatically divide them into columns. Here some static elements -->
  <div class="box" style="background-color: red; height: 100px"></div>
  <div class="box" style="background-color: green; height: 70px"></div>
  <div class="box" style="background-color: blue; height: 30px"></div>
  <div class="box" style="background-color: orange; height: 40px"></div>
              /* Bricklayer calculates its column sizes  from the `bricklayer-column-sizer` element. You can give it some width with media queries to make it responsive */
@media screen and (min-width: 300px) {
  .bricklayer-column-sizer {
    /* If page is greater than 300px, columns will be 20% wide. */
    width: 20%;

@media screen and (min-width: 400px) {
  .bricklayer-column-sizer {
    /* If page is greater than 400px, columns will be 10% wide, which are more narrow. */
    width: 10%;

@media screen and (min-width: 700px) {
  .bricklayer-column-sizer {
    /* If page is greater than 700px, columns will be 5% wide. That means there will be lots of columns */
    width: 5%;

.box {
  margin: 10px 0;
              // You have to create a `Bricklayer` instance for every Bricklayer container you have.
var bricklayer = new Bricklayer(document.getElementById('my-bricklayer'))

// You can delete these lines, these adds dynamic bricklayers to make you understand how it works.
for (var i = 0; i < 20; i++) {

// Did you see a box looks like "/"?
var anotherBox = box()
anotherBox.style.transform = "rotate(10deg)"

🕑 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.
Loading ..................