text-justify: Tailwind CSS Text Align class

The text-justify class aligns text evenly along both the left and right margins.


text-justify

The text-justify class aligns text evenly along both the left and right margins.

Example Code

html
<div class="p-5 font-bold bg-gray-100 rounded-t-md">
<h3 class="text-gray-500">text-justify</h3>
<p class=" text-gray-700 text-justify">
Tasha's fingers hovered over the keyboard, her heart racing as she stared at
the login screen for TechnoFlux, the cutting-edge platform her boss had
raved about for weeks. It promised to streamline data analysis, but to
Tasha, it looked like a labyrinth of buttons, graphs, and drop-down menus.
</p>
</div>

Preview

text-justify

Tasha's fingers hovered over the keyboard, her heart racing as she stared at the login screen for TechnoFlux, the cutting-edge platform her boss had raved about for weeks. It promised to streamline data analysis, but to Tasha, it looked like a labyrinth of buttons, graphs, and drop-down menus.

How to Use

Add the text-justify class directly to your HTML element:

html
<div class="text-justify">
<!-- Your content here -->
</div>

Responsive Usage

Use Tailwind's responsive prefixes to apply text-justify at specific breakpoints:

html
<div class="sm:text-justify md:text-justify lg:text-justify">
Responsive element
</div>
  • sm:text-justify — applies from 640px and up
  • md:text-justify — applies from 768px and up
  • lg:text-justify — applies from 1024px and up

Customization

You can extend or override this utility in your tailwind.config.js. See the Tailwind CSS documentation for details on customizing your theme.

Windframe is an AI visual editor for rapidly building stunning web UIs & websites

Start building stunning web UIs & websites!

Build from scratch or select prebuilt tailwind templates