Sizing Utilities
Control the dimensions of elements.
Width
Control element width.
Fixed widths:
sb-w-0
: 0sb-w-1
: 0.25remsb-w-2
: 0.5remsb-w-4
: 1remsb-w-8
: 2remsb-w-16
: 4remsb-w-32
: 8remsb-w-64
: 16rem
Percentage widths:
sb-w-1/2
: 50%sb-w-1/3
: 33.333333%sb-w-2/3
: 66.666667%sb-w-1/4
: 25%sb-w-3/4
: 75%sb-w-full
: 100%
Viewport widths:
sb-w-screen
: 100vwsb-w-50vw
: 50vwsb-w-75vw
: 75vw
Height
Control element height.
Fixed heights:
sb-h-0
throughsb-h-64
: Same as width scalesb-h-auto
: Auto height
Percentage heights:
sb-h-1/2
: 50%sb-h-1/3
: 33.333333%sb-h-2/3
: 66.666667%sb-h-full
: 100%
Viewport heights:
sb-h-screen
: 100vhsb-h-50vh
: 50vhsb-h-75vh
: 75vh
Min/Max Dimensions
Control minimum and maximum dimensions.
Min-width:
sb-min-w-0
: 0sb-min-w-full
: 100%sb-min-w-screen
: 100vw
Max-width:
sb-max-w-xs
: 20remsb-max-w-sm
: 24remsb-max-w-md
: 28remsb-max-w-lg
: 32remsb-max-w-xl
: 36remsb-max-w-full
: 100%
Min/Max-height:
sb-min-h-0
: 0sb-min-h-full
: 100%sb-min-h-screen
: 100vhsb-max-h-full
: 100%sb-max-h-screen
: 100vh
Aspect Ratio
Control the aspect ratio of elements.
Available classes:
sb-aspect-square
: 1/1sb-aspect-video
: 16/9sb-aspect-portrait
: 3/4sb-aspect-wide
: 21/9
Available object-fit classes:
sb-object-contain
: Scale to fitsb-object-cover
: Cover areasb-object-fill
: Stretch to fillsb-object-none
: Don't resizesb-object-scale-down
: Scale down if needed
Common Pattern: Responsive Image Container
<div class="sb-w-full sb-max-w-lg sb-aspect-video">
<img class="sb-w-full sb-h-full sb-object-cover" src="video-thumb.jpg">
</div>
Continue to Typography Utilities