Spacing Utilities
Control margins, padding, and space between elements.
Padding
Control padding in all directions.
Available classes:
-
sb-p-0throughsb-p-8: All sides -
sb-px-0throughsb-px-8: Left and right -
sb-py-0throughsb-py-8: Top and bottom -
sb-pt-0throughsb-pt-8: Top only -
sb-pr-0throughsb-pr-8: Right only -
sb-pb-0throughsb-pb-8: Bottom only -
sb-pl-0throughsb-pl-8: Left only
Size Reference:
0: 0
1: 0.25rem
2: 0.5rem
3: 1rem
4: 1.5rem
6: 2rem
8: 3rem
Margin
Control margin in all directions.
Available classes:
-
sb-m-0throughsb-m-8: All sides -
sb-mx-0throughsb-mx-8: Left and right -
sb-my-0throughsb-my-8: Top and bottom -
sb-mt-0throughsb-mt-8: Top only -
sb-mr-0throughsb-mr-8: Right only -
sb-mb-0throughsb-mb-8: Bottom only -
sb-ml-0throughsb-ml-8: Left only
Negative Margins
Pull elements closer together.
Available classes:
-
sb-m-n1throughsb-m-n8: All sides -
sb-mt-n1throughsb-mt-n8: Top -
sb-mr-n1throughsb-mr-n8: Right -
sb-mb-n1throughsb-mb-n8: Bottom -
sb-ml-n1throughsb-ml-n8: Left
Space Between
Control space between child elements.
Available classes:
-
sb-space-x-0throughsb-space-x-8: Horizontal space -
sb-space-y-0throughsb-space-y-8: Vertical space
Common Pattern: Card Layout
<div class="sb-p-4 sb-mb-4">
<h2 class="sb-mb-2">Title</h2>
<div class="sb-space-y-2">
<p>First paragraph</p>
<p>Second paragraph</p>
</div>
</div>
Title
First paragraph
Second paragraph
Continue to Transitions and Animations Utilities