Responsive

To control an element's placeholder color opacity at a specific breakpoint, add a {screen}: prefix to any existing placeholder color opacity utility. For example, use md:placeholder-opacity-50 to apply the placeholder-opacity-50 utility at only medium screen sizes and above.

Responsive and pseudo-class variants

By default, only responsive and focus variants are generated for placeholder opacity utilities.

You can control which variants are generated for the placeholder opacity utilities by modifying the placeholderOpacity property in the variants section of your tailwind.config.js file.

For example, this config will also generate hover and active variants:

// tailwind.config.js

module.exports = {

variants: {

// ...

- placeholderOpacity: ['responsive', 'focus'],

+ placeholderOpacity: ['responsive', 'focus', 'hover', 'active'],

}

}

Disabling

If you don't plan to use the placeholder opacity utilities in your project, you can disable them entirely by setting the placeholderOpacity property to false in the corePlugins section of your config file: