Opacity
Utilities for controlling the opacity of an element.
Show all classes
Control the opacity of an element using the utilities.
Tailwind lets you conditionally apply utility classes in different states using variant modifiers. For example, use hover:opacity-100
to only apply the opacity-100
utility on hover.
For a complete list of all available state modifiers, check out the documentation.
You can also use variant modifiers to target media queries like responsive breakpoints, dark mode, prefers-reduced-motion, and more. For example, use to apply the opacity-100
utility at only medium screen sizes and above.
By default, Tailwind provides several opacity utilities for general purpose use. You can customize these values by editing theme.opacity
or in your tailwind.config.js
file.
tailwind.config.js
Learn more about customizing the default theme in the documentation.
Learn more about arbitrary value support in the documentation.