Spacing Utilities
Control margins, padding, and space between elements.
Padding
Control padding in all directions.
Available classes:
sb-p-0
throughsb-p-8
: All sidessb-px-0
throughsb-px-8
: Left and rightsb-py-0
throughsb-py-8
: Top and bottomsb-pt-0
throughsb-pt-8
: Top onlysb-pr-0
throughsb-pr-8
: Right onlysb-pb-0
throughsb-pb-8
: Bottom onlysb-pl-0
throughsb-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-0
throughsb-m-8
: All sidessb-mx-0
throughsb-mx-8
: Left and rightsb-my-0
throughsb-my-8
: Top and bottomsb-mt-0
throughsb-mt-8
: Top onlysb-mr-0
throughsb-mr-8
: Right onlysb-mb-0
throughsb-mb-8
: Bottom onlysb-ml-0
throughsb-ml-8
: Left only
Negative Margins
Pull elements closer together.
Available classes:
sb-m-n1
throughsb-m-n8
: All sidessb-mt-n1
throughsb-mt-n8
: Topsb-mr-n1
throughsb-mr-n8
: Rightsb-mb-n1
throughsb-mb-n8
: Bottomsb-ml-n1
throughsb-ml-n8
: Left
Space Between
Control space between child elements.
Available classes:
sb-space-x-0
throughsb-space-x-8
: Horizontal spacesb-space-y-0
throughsb-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 Sizing Utilities