Browse documentation

Reference / Sizing

Width and height

Set both dimensions with one utility for square swatches, avatars and fixed-size icons.

Working example

Use a fixed size for an avatar. An aspect ratio is useful when the width should remain fluid.

HTML
<div class="flex items-center gap-3">
  <span class="grid size-10 shrink-0 place-items-center rounded-full bg-black text-white">M</span>
  <span>Mono Studio</span>
</div>

Class reference

ClassCSS declarations
size-4width: 1rem; height: 1rem;
size-8width: 2rem; height: 2rem;
size-12width: 3rem; height: 3rem;
size-fullwidth: 100%; height: 100%;
size-[3.25rem]width: 3.25rem; height: 3.25rem;
View full generated CSS
Compiled CSS
.size-12 {
  width: 3rem;
  height: 3rem;
}
.size-4 {
  width: 1rem;
  height: 1rem;
}
.size-8 {
  width: 2rem;
  height: 2rem;
}
.size-\[3\.25rem\] {
  width: 3.25rem;
  height: 3.25rem;
}
.size-full {
  width: 100%;
  height: 100%;
}