Variants factory

The variants factory plugin creates simple custom variants on the go and simply is a shorthand for addVariant Tailwind pluginopen in new window default functionality.

Configuration

The plugin can be configured with the theme.customVariants property:

module.exports = {
  theme: {
    customVariants: {
      children: '& > *', // like addVariant('children', '& > *')
    },
  },
};


 
 
 


TIP

You should add new custom variants to your project via the theme.extend property to not override these defaults.

Last Updated:
Contributors: Antoine Quatrelivre, Titouan Mathis