--- extends: _layouts.documentation title: "Align Self" description: "Utilities for controlling how an individual flex item is positioned along its container's cross axis." features: responsive: true customizable: false hover: false focus: false --- @include('_partials.class-table', [ 'rows' => [ [ '.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')
1
2
3
@endcomponent ### 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')
1
2
3
@endcomponent ### 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')
1
2
3
@endcomponent ### 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')
1
2
3
@endcomponent ### 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')
1
2
3
@endcomponent ## 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](/docs/responsive-design) documentation. @component('_partials.responsive-code-sample') @slot('none')
1
2
3
@endslot @slot('sm')
1
2
3
@endslot @slot('md')
1
2
3
@endslot @slot('lg')
1
2
3
@endslot @slot('xl')
1
2
3
@endslot @slot('code')
2
@endslot @endcomponent