7.1 KiB
| extends | title | category |
|---|---|---|
| _layouts.markdown | Align Items - Flexbox | Flexbox |
Align Items
@include('_partials.feature-badges', [ 'responsive' => true, 'customizable' => false, 'hover' => false, 'focus' => false ])
| Class | Properties | Description |
|---|---|---|
| .items-start | align-items: flex-start; | Align items against the start of the cross axis. |
| .items-center | align-items: center; | Align items along the center of the cross axis. |
| .items-end | align-items: flex-end; | Align items against the end of the cross axis. |
| .items-baseline | align-items: space-between; | Align the baselines of each item. |
Stretch Default
Use .items-stretch to stretch items to fill the flex container's cross axis:
@component('_partials.code-sample')
Start
Use .items-start to align items to the start of the flex container's cross axis:
@component('_partials.code-sample')
Center
Use .items-center to align items along the center of the flex container's cross axis:
@component('_partials.code-sample')
End
Use .items-end to align items to the end of the flex container's cross axis:
@component('_partials.code-sample')
Baseline
Use .items-baseline to align items along the flex container's cross axis such that all of their baselines align:
@component('_partials.code-sample')
Responsive
To control the alignment of flex items at a specific breakpoint, add a {breakpoint}: prefix to any existing utility class. For example, use md:items-center to apply the items-center utility at only medium screen sizes and above.
For more information about Tailwind's responsive design features, check out the Responsive Design documentation.
@component('_partials.responsive-code-sample') @slot('none')