Complete reference guide for all available utility classes and responsive variants
The following breakpoints are defined and used throughout the utility classes:
Spacing is defined using an 8px base unit:
Control the display property of elements.
.d-none display: none .d-flex display: flex .d-grid display: grid .sm-d-block display: block .sm-d-flex display: flex .sm-d-grid display: grid .sm-d-none display: none .md-d-block display: block .md-d-flex display: flex .md-d-grid display: grid .md-d-none display: none .lg-d-block display: block .lg-d-flex display: flex .lg-d-grid display: grid .lg-d-none display: none .xl-d-block display: block .xl-d-flex display: flex .xl-d-grid display: grid .xl-d-none display: none Control flex layout direction and item alignment.
.flex-dir-column flex-direction: column .flex-dir-row flex-direction: row .flex-dir-column-reverse flex-direction: column-reverse .flex-dir-row-reverse flex-direction: row-reverse .align-items-center align-items: center .justify-content-center justify-content: center Available for all breakpoints: sm (576px+), md (768px+), lg (992px+), xl (1200px+)
.[breakpoint]-flex-dir-column flex-direction: column .[breakpoint]-flex-dir-row flex-direction: row .[breakpoint]-flex-dir-column-reverse flex-direction: column-reverse .[breakpoint]-flex-dir-row-reverse flex-direction: row-reverse .[breakpoint]-align-items-center align-items: center .[breakpoint]-justify-content-center justify-content: center Control grid layout with 1-12 column options.
Use .grid-template-columns-[1-12] for base and .[breakpoint]-grid-template-columns-[1-12] for responsive
Use .grid-column-span-[1-12] for base and .[breakpoint]-grid-column-span-[1-12] for responsive
Control margin and padding with responsive variants.
Use .m-[0-5], .mt-[0-5], .mr-[0-5], .mb-[0-5], .ml-[0-5], .mx-[0-5], .my-[0-5], .m-auto
Available for all breakpoints: sm, md, lg, xl
.m-[0-5] margin: [0, 8px, 16px, 32px, 40px, 50px] .mx-auto margin-left & margin-right: auto (horizontal center) .my-auto margin-top & margin-bottom: auto (vertical center) Use .p-[0-5], .pt-[0-5], .pr-[0-5], .pb-[0-5], .pl-[0-5], .px-[0-5], .py-[0-5]
Available for all breakpoints: sm, md, lg, xl
.p-[0-5] padding: [0, 8px, 16px, 32px, 40px, 50px] .px-[0-5] padding-left & padding-right .py-[0-5] padding-top & padding-bottom <div class="d-grid grid-template-columns-1 sm-grid-template-columns-2 lg-grid-template-columns-4">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
<div>Item 4</div>
</div> 1 column on mobile, 2 on small, 4 on large screens
<div class="d-flex flex-dir-column lg-flex-dir-row align-items-center gap-3">
<div>Item 1</div>
<div>Item 2</div>
</div> Stacked on mobile, side-by-side on large screens
<div class="m-2 lg-m-4 p-2 lg-p-3 mx-auto">
Content with responsive margins and padding
</div> Smaller spacing on mobile, larger on desktop, horizontally centered