tailwind-fundamentals
tailwind-fundamentals

20 Best Tailwind Features

The top 20 seriously.

Oct 25, 2024by jthompson22
Tailwind

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 styles
  • matchUtilities(), for registering new dynamic utility styles
  • addComponents(), for registering new static component styles
  • matchComponents(), for registering new dynamic component styles
  • addBase(), for registering new base styles
  • addVariant(), for registering custom static variants
  • matchVariant(), for registering custom dynamic variants
  • theme(), for looking up values in the user’s theme configuration
  • config(), 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.