Skip to main content
Version: v4

Background Color

ClassSupport
bg-{n}โœ… Full Support
bg-[n]โœ… Full Support
bg-inherit๐ŸŒ Web only
bg-current๐ŸŒ Web only
Legend

Classโ€‹

-{n} Supports values from theme

-[n] Supports arbitrary values

Iconโ€‹

โœ… Full support

โœ”๏ธ Partial support on native

๐Ÿงช Experimental support on native

๐Ÿ“ฑ Native only

๐ŸŒ Web only

backgrondOpacity (native only)

For performance reasons, NativeWind renders with the corePlugin backgroundOpacity disabled. This plugin allows text to dynamically change it's opacity via the --tw-background-opacity variable. Instead, the opacity is set as a static value in the color property.

If you need to use this feature, you can enable it by adding the following to your tailwind.config.js file:

module.exports = {
/* ... */
corePlugin: {
backgroundOpacity: true,
},
};