Display
Control how elements are displayed with our display utilities.Display Properties
.block | Block | display: block; | Full-width block element |
.inline-block | Inline-block | display: inline-block; | Inline with block properties |
.flex | Flex | display: flex; | Flexbox container |
.inline-flex | Inline-flex | display: inline-flex; | Inline flexbox container |
.hidden | Hidden | display: none; | Hide element |
Examples
Overflow
Control how content overflows its container.Overflow Properties
.overflow-hidden | Hidden | overflow: hidden; | Hide overflowing content |
.overflow-auto | Auto | overflow: auto; | Show scrollbars when needed |
Examples
Object Fit
Control how images and videos fit within their containers.Object Fit Properties
.object-cover | Cover | object-fit: cover; | Cover container, crop if needed |
.object-contain | Contain | object-fit: contain; | Fit within container, no cropping |
Examples
Aspect Ratio
Control the aspect ratio of elements.Aspect Ratio Properties
.aspect-square | 1:1 | aspect-ratio: 1 / 1; | Square aspect ratio |
.aspect-video | 16:9 | aspect-ratio: 16 / 9; | Video aspect ratio |
Examples
Flexbox Direction
Control the direction of flex items.Flex Direction
.flex-row | Row | flex-direction: row; | Horizontal layout (default) |
.flex-col | Column | flex-direction: column; | Vertical layout |
Examples
Flexbox Wrap
Control how flex items wrap.Flex Wrap
.flex-wrap | Wrap | flex-wrap: wrap; | Allow wrapping |
.flex-nowrap | No wrap | flex-wrap: nowrap; | Prevent wrapping |
Examples
Justify Content
Control horizontal alignment of flex items.Justify Content
.justify-start | Start | justify-content: start; | Align to start |
.justify-center | Center | justify-content: center; | Center alignment |
.justify-end | End | justify-content: end; | Align to end |
.justify-between | Space between | justify-content: space-between; | Space between items |
Examples
Align Items
Control vertical alignment of flex items.Align Items
.items-start | Start | align-items: start; | Align to start |
.items-center | Center | align-items: center; | Center alignment |
.items-end | End | align-items: end; | Align to end |
.items-stretch | Stretch | align-items: stretch; | Stretch to fill |
Examples
Align Self
Control individual item alignment within a flex container.Align Self
.self-center | Center | align-self: center; | Center this item |
.self-start | Start | align-self: start; | Align to start |
.self-end | End | align-self: end; | Align to end |
Examples
Gap
Control spacing between flex items.Gap Properties
.gap-1 | 4px | gap: 4px; | Small gap |
.gap-2 | 8px | gap: 8px; | Small gap |
.gap-3 | 12px | gap: 12px; | Medium gap |
.gap-4 | 16px | gap: 16px; | Standard gap |
.gap-6 | 24px | gap: 24px; | Large gap |
.gap-8 | 32px | gap: 32px; | Extra large gap |
Examples
Common Layout Patterns
Header Layout
Header with Logo and Navigation
Card Grid
Responsive Card Grid
Centered Content
Centered Content Layout
Sidebar Layout
Sidebar with Main Content
Best Practices
Flexbox Layouts
1
Use Semantic HTML
Always use proper HTML elements with flexbox utilities.
2
Consistent Gaps
Use the gap utility instead of margin for spacing between flex items.
3
Responsive Design
Consider how layouts will work on different screen sizes.
4
Accessibility
Ensure flexbox layouts work with screen readers and keyboard navigation.
Performance
- Flexbox is well-optimized in modern browsers
- Use
gapinstead of margin for better performance - Avoid deeply nested flexbox containers when possible

