Text Transform
Normal Case
Use the utility to preserve the original casing. This is typically used to reset capitalization at different breakpoints.
Use the .uppercase
utility to uppercase text.
<p class="uppercase ...">The quick brown fox ...</p>
Lowercase
Use the .lowercase
utility to lowercase text.
Use the .capitalize
utility to capitalize text.
<p class="capitalize ...">The quick brown fox ...</p>
Responsive
For more information about Tailwind’s responsive design features, check out the documentation.
all
sm
md
xl
The quick brown fox jumped over the lazy dog.
By default, only responsive variants are generated for text transformation utilities.
You can control which variants are generated for the text transformation utilities by modifying the textTransform
property in the variants
section of your tailwind.config.js
file.
For example, this config will also generate hover and focus variants:
module.exports = {
// ...
- textTransform: ['responsive'],
+ textTransform: ['responsive', 'hover', 'focus'],
}
Disabling
If you don’t plan to use the text transformation utilities in your project, you can disable them entirely by setting the textTransform
property to in the corePlugins
section of your config file: