Text Indent
Utilities for controlling the amount of empty space shown before text in a block.
Show all classes
Use the utilities to set the amount of empty space (indentation) that’s shown before text in a block.
Using negative values
<div class="-indent-8">
So I started to walk into the water. I won't lie to...
</div>
Tailwind lets you conditionally apply utility classes in different states using variant modifiers. For example, use hover:indent-8
to only apply the indent-8
utility on hover.
For a complete list of all available state modifiers, check out the Hover, Focus, & Other States documentation.
Breakpoints and media queries
You can also use variant modifiers to target media queries like responsive breakpoints, dark mode, prefers-reduced-motion, and more. For example, use md:indent-8
to apply the indent-8
utility at only medium screen sizes and above.
<div class="indent-4 md:indent-8">
To learn more, check out the documentation on Responsive Design, and other media query modifiers.
tailwind.config.js
Alternatively, you can customize just the text indent scale by editing theme.textIndent
or theme.extend.textIndent
in your tailwind.config.js
file.
tailwind.config.js
module.exports = {
extend: {
textIndent: {
'128': '32rem',
}
}
}
Learn more about customizing the default theme in the documentation.
Arbitrary values
Learn more about arbitrary value support in the documentation.