Browse documentation
Reference / Sizing
Width and height
Set both dimensions with one utility for square swatches, avatars and fixed-size icons.
Working example
M
Mono Studio
Use a fixed size for an avatar. An aspect ratio is useful when the width should remain fluid.
<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
| Class | CSS declarations |
|---|---|
size-4 | width: 1rem;
height: 1rem; |
size-8 | width: 2rem;
height: 2rem; |
size-12 | width: 3rem;
height: 3rem; |
size-full | width: 100%;
height: 100%; |
size-[3.25rem] | width: 3.25rem;
height: 3.25rem; |
View full generated 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%;
}