Docs / Justify Items

Justify Items

vel-src: flexbox.css

Utilities for controlling how grid items are aligned along their inline axis.

ClassProperties
vel-justify-items-startjustify-items: start
vel-justify-items-endjustify-items: end
vel-justify-items-centerjustify-items: center
vel-justify-items-stretchjustify-items: stretch

Examples

Justify items variants

vel-justify-items-start

A
B

vel-justify-items-center

A
B

vel-justify-items-end

A
B
example.html
<div class="vel-flex vel-gap-4">
  <div style="flex:1">
    <p style="color:#64748b;font-size:11px;margin-bottom:4px">vel-justify-items-start</p>
    <div class="vel-grid vel-grid-cols-2 vel-justify-items-start vel-gap-2" style="background:#1a2236;padding:8px;border-radius:6px">
      <div class="vel-bg-primary vel-text-white vel-rounded-sm" style="padding:6px 12px;font-size:12px">A</div>
      <div class="vel-bg-primary vel-text-white vel-rounded-sm" style="padding:6px 12px;font-size:12px">B</div>
    </div>
  </div>
  <div style="flex:1">
    <p style="color:#64748b;font-size:11px;margin-bottom:4px">vel-justify-items-center</p>
    <div class="vel-grid vel-grid-cols-2 vel-justify-items-center vel-gap-2" style="background:#1a2236;padding:8px;border-radius:6px">
      <div class="vel-bg-success vel-text-white vel-rounded-sm" style="padding:6px 12px;font-size:12px">A</div>
      <div class="vel-bg-success vel-text-white vel-rounded-sm" style="padding:6px 12px;font-size:12px">B</div>
    </div>
  </div>
  <div style="flex:1">
    <p style="color:#64748b;font-size:11px;margin-bottom:4px">vel-justify-items-end</p>
    <div class="vel-grid vel-grid-cols-2 vel-justify-items-end vel-gap-2" style="background:#1a2236;padding:8px;border-radius:6px">
      <div class="vel-bg-danger vel-text-white vel-rounded-sm" style="padding:6px 12px;font-size:12px">A</div>
      <div class="vel-bg-danger vel-text-white vel-rounded-sm" style="padding:6px 12px;font-size:12px">B</div>
    </div>
  </div>
</div>