Skip to content

Align Items

Utilities for applying align-items property an element.

Quick reference

ClassPropertyToken
align-items-startalign-items: start;start
align-items-endalign-items: end;end
align-items-centeralign-items: center;center
align-items-stretchalign-items: stretch;baseline
align-items-baselinealign-items: baseline;stretch

Usage

Use the align-items-{key} class for set up the align-items type.

html

<div class="align-items-center">
    <!-- ... -->
</div>

Applying conditionally

Breakpoints and media queries

You can also control the responsive breakpoint with variant class modifiers. For example lg:align-items-start will be only apply on large screens size and above.

html

<div class="align-items-center lg:align-items-start">
    <!-- ... -->
</div>

Customization

Extend your theme

By default, the configuration provides a handful of general purpose align-items type utilities. You can easily filter the default scales using the Sass configuration.

scss
@use "lasco" with (
    $extend: (
        "align-items": (
            "center"
        )
    )
);

Released under the MIT License.