Skip to content

Justify Content

Utilities for applying justify-content property an element.

Quick reference

ClassPropertyToken
justify-content-startjustify-content: start;start
justify-content-endjustify-content: end;end
justify-content-centerjustify-content: center;center
justify-content-space-betweenjustify-content: space-between;space-between
justify-content-space-aroundjustify-content: space-around;space-around
justify-content-space-evenlyjustify-content: space-evenly;space-evenly
justify-content-stretchjustify-content: stretch;stretch

Usage

Use the justify-content-{key} class for set up the justify-content type.

html

<div class="justify-content-center">
    <!-- ... -->
</div>

Applying conditionally

Breakpoints and media queries

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

html

<div class="justify-content-center lg:justify-content-start">
    <!-- ... -->
</div>

Customization

Extend your theme

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

scss
@use "lasco" with (
    $extend: (
        "justify-content": (
            "center"
        )
    )
);

Released under the MIT License.