7.7 KiB
| extends | title |
|---|---|
| _layouts.documentation | Align Items - Flexbox |
Align Self
@include('_partials.feature-badges', [ 'responsive' => true, 'customizable' => false, 'hover' => false, 'focus' => false ])
| Class | Properties | Description |
|---|---|---|
| .self-auto | align-self: auto; | Align item based on the container's align-items property. |
| .self-start | align-self: flex-start; | Align item against the start of the cross axis. |
| .self-center | align-self: center; | Align item along the center of the cross axis. |
| .self-end | align-self: flex-end; | Align item against the end of the cross axis. |
| .self-stretch | align-self: stretch; | Stretch item to fill the cross axis. |
Auto Default
Use .self-auto to align an item based on the value of the flex container's align-items property:
@component('_partials.code-sample')
Start
Use .self-start to align an item to the start of the flex container's cross axis, despite the container's align-items value:
@component('_partials.code-sample')
Center
Use .self-center to align an item along the center of the flex container's cross axis, despite the container's align-items value:
@component('_partials.code-sample')
End
Use .self-end to align an item to the end of the flex container's cross axis, despite the container's align-items value:
@component('_partials.code-sample')
Stretch
Use .self-stretch to stretch an item to fill the flex container's cross axis, despite the container's align-items value:
@component('_partials.code-sample')
Responsive
To control the alignment of a flex item at a specific breakpoint, add a {screen}: prefix to any existing utility class. For example, use md:self-end to apply the self-end 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')