What Are The Plugin Functions?
Plugin functions receive a single object argument that can be destructured into several helper functions:
addUtilities()
, for registering new static utility stylesmatchUtilities()
, for registering new dynamic utility stylesaddComponents()
, for registering new static component stylesmatchComponents()
, for registering new dynamic component stylesaddBase()
, for registering new base stylesaddVariant()
, for registering custom static variantsmatchVariant()
, for registering custom dynamic variantstheme()
, for looking up values in the user’s theme configurationconfig()
, for looking up values in the user’s Tailwind configuration<strong>corePlugins()</strong>
, for checking if a core plugin is enabled<strong>e()</strong>
, for manually escaping strings meant to be used in class names
The plugin functions in Tailwind CSS framework include addUtilities(), matchUtilities(), addComponents(), matchComponents(), addBase(), addVariant(), matchVariant(), theme(), config(), corePlugins(), and e(). These functions serve different purposes within the framework to customize styles and configurations.