Grid & Layout

Ready-to-copy molique grid patterns - from the automatic Auto-Grid, through the rigid 12-column grid and overlapping cards, to Flexbox and the asymmetric Bento Grid.

Smart Auto-Grid (RAM)

The .grid-auto class automatically arranges elements into columns - if there's no room, they drop to a new line on their own. Zero Media Queries!

Card 1
Card 2
Card 3
<!-- Elements arrange themselves into 1, 2, or 3 columns depending on the screen -->
<div class="grid-auto gap-4">
  <div class="card">Card 1</div>
  <div class="card">Card 2</div>
  <div class="card">Card 3</div>
</div>

Rigid Grid (12-column)

When you need precise control - the .grid-cols-12 class on the parent and .col-span-* on the children.

.col-md-span-8 (66%)
.col-md-span-4 (33%)
<!-- 1 column on mobile, 12 columns from tablet up -->
<div class="grid-cols-1 grid-md-cols-12 gap-4">

  <!-- Takes up 8 columns on desktop (100% on mobile) -->
  <div class="col-md-span-8">Main content</div>

  <!-- Takes up 4 columns on desktop (100% on mobile) -->
  <div class="col-md-span-4">Sidebar</div>

</div>

Overlapping Cards

A common Premium pattern - a card "rides up" onto the section above (e.g. a search bar over a Hero photo).

Hero Section

Overlapping card (.overlap-container)

<!-- Section with large bottom padding (pb-5) -->
<section class="bg-dark pb-5">...</section>

<!-- Card that rides up onto the section above -->
<div class="container overlap-container">
  <div class="card shadow-lg">
    Card content
  </div>
</div>

Flexbox and Element Alignment

Utility classes for centering, distributing, and reordering elements inside containers.

Right alignment and vertical centering

Mobile Reverse (shrink the window to see the reorder!)

Text on the left

On desktop I'm on the left. On phones I drop to the very bottom, below the photo!

Photo on the right
<!-- Element alignment -->
<div class="d-flex justify-content-end align-items-center">...</div>

<!-- Reorder on mobile (Mobile Reverse) -->
<div class="d-flex flex-column-reverse flex-md-row">
  <div class="w-100 w-md-50">Text (at the bottom on mobile)</div>
  <div class="w-100 w-md-50">Photo (at the top on mobile)</div>
</div>

Bento Grid

A modern, asymmetric tile layout popularized by Apple. Ideal for dashboards and "Features" sections.

Main tile

.bento-col-2 .bento-row-2

Small

Vertical

.bento-row-2

Horizontal

.bento-col-2

<div class="bento-grid">
  <div class="bento-col-2 bento-row-2">Large square</div>
  <div>Regular square</div>
  <div class="bento-row-2">Vertical rectangle</div>
  <div class="bento-col-2">Horizontal rectangle</div>
</div>