@tailwindcss/typography vs @tailwindcss/forms vs tailwindcss-radix vs windicss
Enhancing Tailwind CSS: Forms, Typography, Color Systems, and Build Engines
@tailwindcss/typography@tailwindcss/formstailwindcss-radixwindicssSimilar Packages:

Enhancing Tailwind CSS: Forms, Typography, Color Systems, and Build Engines

These four packages extend the core Tailwind CSS ecosystem in distinct ways. @tailwindcss/forms and @tailwindcss/typography are official plugins that reset and style specific HTML elements (form controls and prose content) to reduce boilerplate. tailwindcss-radix integrates the Radix UI color palettes, offering a superior, accessible alternative to the default color scale for building themes. windicss was a high-performance, on-demand build engine compatible with Tailwind's syntax but has been deprecated in favor of Tailwind CSS v3+. Understanding the difference between official plugins, theme extensions, and the build engine itself is critical for making sustainable architectural choices.

Npm Package Weekly Downloads Trend

3 Years

Github Stars Ranking

Stat Detail

Package
Downloads
Stars
Size
Issues
Publish
License
@tailwindcss/typography13,292,1446,481115 kB125 months agoMIT
@tailwindcss/forms2,861,0134,56455.7 kB310 months agoMIT
tailwindcss-radix165,9702,16231.8 kB02 years agoMIT
windicss28,5386,5012.29 MB221-MIT

Enhancing Tailwind CSS: Forms, Typography, Color Systems, and Build Engines

When building production-grade interfaces with Tailwind CSS, developers often encounter three specific hurdles: inconsistent form styling across browsers, the tediousness of styling rich text content, and the complexity of managing accessible color themes. Additionally, the landscape of build engines has shifted significantly in recent years. This analysis compares two official plugins (@tailwindcss/forms, @tailwindcss/typography), a theme extension (tailwindcss-radix), and a deprecated build engine (windicss) to help you make the right architectural decision.

🎨 Styling Form Elements: The Reset Problem

Form elements are notoriously difficult to style consistently. Browsers apply heavy default styles that are hard to override with utility classes alone.

@tailwindcss/forms solves this by applying a strategic reset. It strips away browser defaults and provides a clean baseline that you can easily build upon.

// tailwind.config.js
module.exports = {
  plugins: [
    require('@tailwindcss/forms'),
  ],
}
<!-- Without the plugin: Requires extensive custom CSS to look good -->
<input type="text" class="border p-2 rounded">

<!-- With the plugin: Clean baseline, easy to customize -->
<input type="text" class="form-input mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500">

@tailwindcss/typography does not handle forms. If you try to use it for inputs, you will find it lacks specific utilities for form states like focus rings or custom checkbox appearances.

<!-- Typography plugin ignores specific form resets -->
<div class="prose">
  <input type="text"> <!-- Still has browser defaults -->
</div>

tailwindcss-radix focuses purely on color values. It provides excellent colors for form borders and focus states but does not alter the structural CSS or reset browser defaults for inputs.

<!-- Radix provides colors, but no structural reset -->
<input class="border radix-slate-12 bg-radix-slate-2">
<!-- Still needs manual reset for appearance -->

windicss included built-in form resets similar to the official plugin, but since the project is deprecated, relying on it introduces significant maintenance risk.

<!-- Windicss (Deprecated) had built-in utilities -->
<input class="form-input">
<!-- ⚠️ Do not use in new projects: No future updates or security patches -->

πŸ“ Handling Rich Text: The "Prose" Solution

When rendering content from a CMS (like WordPress or Contentful) or Markdown, you cannot add utility classes to every <p>, <h2>, or <ul> tag inside the content.

@tailwindcss/typography is the industry standard for this. It introduces the prose class, which applies opinionated, readable styles to all nested HTML elements automatically.

// tailwind.config.js
module.exports = {
  plugins: [
    require('@tailwindcss/typography'),
  ],
}
<!-- Automatically styles h1, p, ul, code, etc. inside -->
<article class="prose lg:prose-xl">
  <h1>My Blog Post</h1>
  <p>This paragraph gets nice line-height and color automatically.</p>
  <code>console.log('styled!')</code>
</article>

@tailwindcss/forms has no effect on rich text content. It strictly targets input, select, textarea, and checkbox elements.

<!-- Forms plugin does nothing here -->
<div class="form-prose">
  <!-- No such class exists in this plugin -->
</div>

tailwindcss-radix can be used alongside typography to change the color theme of the prose, but it does not provide the layout logic (margins, font sizes) itself.

<!-- You must still configure typography plugin for layout -->
<article class="prose prose-radix">
  <!-- Requires custom configuration to map radix colors to prose -->
</article>

windicss had a similar feature called prose, but again, using a deprecated engine for content rendering prevents you from using the latest improvements in the official typography plugin.

<!-- Windicss supported prose, but is now obsolete -->
<div class="prose">
  <!-- ⚠️ Risk: Missing out on new typography modifiers added to official plugin -->
</div>

🌈 Color Systems: Default vs. Radix

Choosing the right color palette impacts accessibility and dark mode implementation.

tailwindcss-radix replaces or extends the default palette with 12-step scales designed for UI surfaces, text, and borders. It solves the "muddy dark mode" problem where simple inversion looks broken.

// tailwind.config.js
module.exports = {
  presets: [require('tailwindcss-radix')()],
  theme: {
    extend: {
      colors: {
        // Accessible, high-contrast colors out of the box
        background: 'var(--radix-slate-1)',
        text: 'var(--radix-slate-12)',
      }
    }
  }
}
<!-- Using Radix semantic variables -->
<div class="bg-background text-text">
  <button class="bg-indigo-9 text-indigo-1 hover:bg-indigo-10">
    Click me
  </button>
</div>

@tailwindcss/forms and @tailwindcss/typography use whatever color palette is configured in your main Tailwind config. They do not provide colors themselves but work seamlessly with Radix if you set it up.

<!-- Forms plugin adapts to your config -->
<input class="form-input border-gray-300">
<!-- If you swap to Radix, you change the config, not the plugin usage -->

windicss used the standard Tailwind color palette by default. While you could configure custom colors, it lacked the first-class integration and pre-built semantic variables that tailwindcss-radix offers today.

// Windicss config (Legacy)
export default {
  theme: {
    colors: { /* manual setup required */ }
  }
}

βš™οΈ The Build Engine: Active vs. Deprecated

The underlying engine compiles your CSS. This is where the most critical architectural decision lies.

windicss was famous for its "on-demand" compilation speed and single-file distribution. However, the maintainers officially announced its deprecation in 2023. The features that made it fast (JIT engine) are now the default in Tailwind CSS v3 and v4.

# ⚠️ DEPRECATED: Do not install
npm install windicss

# Migration path: Use official Tailwind
npm install -D tailwindcss postcss autoprefixer

@tailwindcss/forms, @tailwindcss/typography, and tailwindcss-radix are all designed to work with the official Tailwind CSS engine. They rely on the stable plugin API provided by the core team.

// Current standard architecture
// tailwind.config.js
module.exports = {
  content: ["./src/**/*.{html,js}"],
  plugins: [
    require('@tailwindcss/forms'),
    require('@tailwindcss/typography'),
  ],
  presets: [require('tailwindcss-radix')()] // Optional theme preset
}

πŸ†š Summary of Capabilities

Feature@tailwindcss/forms@tailwindcss/typographytailwindcss-radixwindicss
Primary GoalReset & style form inputsStyle rich HTML contentAccessible color scalesBuild engine (Legacy)
Statusβœ… Active (Official)βœ… Active (Official)βœ… Active (Community)❌ Deprecated
Best ForDashboards, Auth screensBlogs, Docs, CMS contentDesign Systems, Dark ModeNone (Migrate away)
Code ImpactRemoves browser defaultsAdds .prose modifierAdds semantic color varsReplaced by Tailwind v3+

πŸ’‘ Architectural Recommendation

For any new professional project, your stack should look like this:

  1. Core Engine: Use Tailwind CSS v3 or v4. Do not use windicss. The performance gains it once offered are now standard in the official package, and staying on the official path ensures you get security updates and new features.
  2. Forms: Install @tailwindcss/forms immediately. It saves dozens of hours of fighting browser inconsistencies. It is a near-mandatory dependency for any app with user input.
  3. Content: Install @tailwindcss/typography if your app displays external content. It keeps your component code clean by avoiding the need to style child elements manually.
  4. Theme: Consider tailwindcss-radix if you are building a complex design system or need bulletproof dark mode support. If you are building a simple marketing site, the default Tailwind colors may suffice, but Radix is worth the investment for large-scale apps.

By combining the official engine with these specialized plugins, you create a maintainable, future-proof styling architecture that leverages the best tools the ecosystem has to offer.

How to Choose: @tailwindcss/typography vs @tailwindcss/forms vs tailwindcss-radix vs windicss

  • @tailwindcss/typography:

    Select this plugin when your application renders unstyled HTML content from a CMS, markdown files, or API responses (like blog posts or documentation). It automatically styles nested elements like headings, lists, and code blocks within a container using the prose class, saving you from manually targeting every child element. It is the standard solution for content-heavy pages in the Tailwind ecosystem.

  • @tailwindcss/forms:

    Choose this package if you are building applications with many input fields, selects, or checkboxes and want to avoid writing custom CSS resets for every browser inconsistency. It provides a sensible default style that makes form elements look clean immediately while remaining fully customizable via utility classes. It is an essential addition for almost any production dashboard or SaaS product using Tailwind.

  • tailwindcss-radix:

    Use this library if you need a robust, accessible color system that handles light and dark modes seamlessly without manual configuration. It replaces the default Tailwind color palette with the Radix UI scales, which are scientifically designed for consistent contrast and visual harmony. This is ideal for design systems where color accuracy and accessibility compliance are top priorities.

  • windicss:

    Do NOT choose this package for new projects. Windicss was a fast, on-demand build engine but has been officially deprecated since the release of Tailwind CSS v3, which adopted its best features (like the JIT engine) into the core. Migrating to standard Tailwind CSS ensures long-term support, access to the latest features, and compatibility with the broader plugin ecosystem.

README for @tailwindcss/typography

Tailwind CSS Typography

The official Tailwind CSS Typography plugin provides a set of prose classes you can use to add beautiful typographic defaults to any vanilla HTML you don’t control, like HTML rendered from Markdown, or pulled from a CMS.

<article class="prose lg:prose-xl">{{ markdown }}</article>

To see what it looks like in action, check out our live demo on Tailwind Play.


Installation

Install the plugin from npm:

npm install -D @tailwindcss/typography

Then add the plugin to your main style.css file:

  @import "tailwindcss";
+ @plugin "@tailwindcss/typography";

If you are still using Tailwind CSS v3, add the plugin to your tailwind.config.js file:

// tailwind.config.js
module.exports = {
  theme: {
    // ...
  },
  plugins: [
    require('@tailwindcss/typography'),
    // ...
  ],
}

Basic usage

Now you can use the prose classes to add sensible typography styles to any vanilla HTML:

<article class="prose lg:prose-xl">
  <h1>Garlic bread with cheese: What the science tells us</h1>
  <p>
    For years parents have espoused the health benefits of eating garlic bread with cheese to their
    children, with the food earning such an iconic status in our culture that kids will often dress
    up as warm, cheesy loaf for Halloween.
  </p>
  <p>
    But a recent study shows that the celebrated appetizer may be linked to a series of rabies cases
    springing up around the country.
  </p>
  <!-- ... -->
</article>

Choosing a gray scale

This plugin includes a modifier class for each of the five gray scales Tailwind includes by default so you can easily style your content to match the grays you're using in your project.

<article class="prose prose-slate">{{ markdown }}</article>

Here are the classes that are generated using a totally default Tailwind CSS v2.0 build:

ClassGray scale
prose-gray (default)Gray
prose-slateSlate
prose-zincZinc
prose-neutralNeutral
prose-stoneStone

Modifier classes are designed to be used with the multi-class modifier pattern and must be used in conjunction with the base prose class.

[!NOTE] Always include the prose class when adding a gray scale modifier

<article class="prose prose-stone">{{ markdown }}</article>

To learn about creating your own color themes, read the adding custom color themes documentation.

Applying a type scale

Size modifiers allow you to adjust the overall size of your typography for different contexts.

<article class="prose prose-xl">{{ markdown }}</article>

Five different typography sizes are included out of the box:

ClassBody font size
prose-sm0.875rem (14px)
prose-base (default)1rem (16px)
prose-lg1.125rem (18px)
prose-xl1.25rem (20px)
prose-2xl1.5rem (24px)

These can be used in combination with Tailwind's breakpoint modifiers to change the overall font size of a piece of content at different viewport sizes:

<article class="prose md:prose-lg lg:prose-xl">{{ markdown }}</article>

Everything about the provided size modifiers has been hand-tuned by professional designers to look as beautiful as possible, including the relationships between font sizes, heading spacing, code block padding, and more.

Size modifiers are designed to be used with the multi-class modifier pattern and must be used in conjunction with the base prose class.

[!NOTE] Always include the prose class when adding a size modifier

<article class="prose prose-lg">{{ markdown }}</article>

To learn about customizing the included type scales, read the documentation on customizing the CSS.

Adapting to dark mode

Each default color theme includes a hand-designed dark mode version that you can trigger by adding the prose-invert class:

<article class="prose dark:prose-invert">{{ markdown }}</article>

To learn about creating your own color themes, read the adding custom color themes documentation.

Element modifiers

Use element modifiers to customize the style of individual elements in your content directly in your HTML:

<article class="prose prose-img:rounded-xl prose-headings:underline prose-a:text-blue-600">
  {{ markdown }}
</article>

This makes it easy to do things like style links to match your brand, add a border radius to images, and tons more.

Here's a complete list of available element modifiers:

ModifierTarget
prose-headings:{utility}h1, h2, h3, h4, th
prose-lead:{utility}[class~="lead"]
prose-h1:{utility}h1
prose-h2:{utility}h2
prose-h3:{utility}h3
prose-h4:{utility}h4
prose-p:{utility}p
prose-a:{utility}a
prose-blockquote:{utility}blockquote
prose-figure:{utility}figure
prose-figcaption:{utility}figcaption
prose-strong:{utility}strong
prose-em:{utility}em
prose-kbd:{utility}kbd
prose-code:{utility}code
prose-pre:{utility}pre
prose-ol:{utility}ol
prose-ul:{utility}ul
prose-li:{utility}li
prose-dl:{utility}dl
prose-dt:{utility}dt
prose-dd:{utility}dd
prose-table:{utility}table
prose-thead:{utility}thead
prose-tr:{utility}tr
prose-th:{utility}th
prose-td:{utility}td
prose-img:{utility}img
prose-picture:{utility}picture
prose-video:{utility}video
prose-hr:{utility}hr

When stacking these modifiers with other modifiers like hover, you most likely want the other modifier to come last:

<article class="prose prose-a:text-blue-600 prose-a:hover:text-blue-500">{{ markdown }}</article>

If you are still using in Tailwind CSS v3, the modifier order is the opposite:

<article class="prose prose-a:text-blue-600 hover:prose-a:text-blue-500">{{ markdown }}</article>

Read the Tailwind CSS documentation on stacked modifiers to learn more.

Overriding max-width

Each size modifier comes with a baked in max-width designed to keep the content as readable as possible. This isn't always what you want though, and sometimes you'll want the content to just fill the width of its container.

In those cases, all you need to do is add max-w-none to your content to override the embedded max-width:

<div class="grid grid-cols-4">
  <div class="col-span-1">
    <!-- ... -->
  </div>
  <div class="col-span-3">
    <article class="prose max-w-none">{{ markdown }}</article>
  </div>
</div>

Advanced topics

Undoing typography styles

If you have a block of markup embedded in some content that shouldn't inherit the prose styles, use the not-prose class to sandbox it:

<article class="prose">
  <h1>My Heading</h1>
  <p>...</p>

  <div class="not-prose">
    <!-- Some example or demo that needs to be prose-free -->
  </div>

  <p>...</p>
  <!-- ... -->
</article>

Note that you can't nest new prose instances within a not-prose block at this time.

Even when using a prefix for your utilities not-prose should not have a prefix.

Adding custom color themes

To customize the color theme beyond simple CSS overrides, add a @utility directive to your CSS file:

@utility prose-pink {
  --tw-prose-body: var(--color-pink-800);
  --tw-prose-headings: var(--color-pink-900);
  --tw-prose-lead: var(--color-pink-700);
  --tw-prose-links: var(--color-pink-900);
  --tw-prose-bold: var(--color-pink-900);
  --tw-prose-counters: var(--color-pink-600);
  --tw-prose-bullets: var(--color-pink-400);
  --tw-prose-hr: var(--color-pink-300);
  --tw-prose-quotes: var(--color-pink-900);
  --tw-prose-quote-borders: var(--color-pink-300);
  --tw-prose-captions: var(--color-pink-700);
  --tw-prose-code: var(--color-pink-900);
  --tw-prose-pre-code: var(--color-pink-100);
  --tw-prose-pre-bg: var(--color-pink-900);
  --tw-prose-th-borders: var(--color-pink-300);
  --tw-prose-td-borders: var(--color-pink-200);
  --tw-prose-invert-body: var(--color-pink-200);
  --tw-prose-invert-headings: var(--color-white);
  --tw-prose-invert-lead: var(--color-pink-300);
  --tw-prose-invert-links: var(--color-white);
  --tw-prose-invert-bold: var(--color-white);
  --tw-prose-invert-counters: var(--color-pink-400);
  --tw-prose-invert-bullets: var(--color-pink-600);
  --tw-prose-invert-hr: var(--color-pink-700);
  --tw-prose-invert-quotes: var(--color-pink-100);
  --tw-prose-invert-quote-borders: var(--color-pink-700);
  --tw-prose-invert-captions: var(--color-pink-400);
  --tw-prose-invert-code: var(--color-white);
  --tw-prose-invert-pre-code: var(--color-pink-300);
  --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);
  --tw-prose-invert-th-borders: var(--color-pink-600);
  --tw-prose-invert-td-borders: var(--color-pink-700);
}

For Tailwind v3, update the typography section in the JavaScript config file and provide your colors under the css key:

/** @type {import('tailwindcss').Config} */
module.exports = {
  theme: {
    extend: {
      typography: () => ({
        pink: {
          css: {
            '--tw-prose-body': 'var(--color-pink-800)',
            '--tw-prose-headings': 'var(--color-pink-900)',
            '--tw-prose-lead': 'var(--color-pink-700)',
            '--tw-prose-links': 'var(--color-pink-900)',
            '--tw-prose-bold': 'var(--color-pink-900)',
            '--tw-prose-counters': 'var(--color-pink-600)',
            '--tw-prose-bullets': 'var(--color-pink-400)',
            '--tw-prose-hr': 'var(--color-pink-300)',
            '--tw-prose-quotes': 'var(--color-pink-900)',
            '--tw-prose-quote-borders': 'var(--color-pink-300)',
            '--tw-prose-captions': 'var(--color-pink-700)',
            '--tw-prose-code': 'var(--color-pink-900)',
            '--tw-prose-pre-code': 'var(--color-pink-100)',
            '--tw-prose-pre-bg': 'var(--color-pink-900)',
            '--tw-prose-th-borders': 'var(--color-pink-300)',
            '--tw-prose-td-borders': 'var(--color-pink-200)',
            '--tw-prose-invert-body': 'var(--color-pink-200)',
            '--tw-prose-invert-headings': 'var(--color-white)',
            '--tw-prose-invert-lead': 'var(--color-pink-300)',
            '--tw-prose-invert-links': 'var(--color-white)',
            '--tw-prose-invert-bold': 'var(--color-white)',
            '--tw-prose-invert-counters': 'var(--color-pink-400)',
            '--tw-prose-invert-bullets': 'var(--color-pink-600)',
            '--tw-prose-invert-hr': 'var(--color-pink-700)',
            '--tw-prose-invert-quotes': 'var(--color-pink-100)',
            '--tw-prose-invert-quote-borders': 'var(--color-pink-700)',
            '--tw-prose-invert-captions': 'var(--color-pink-400)',
            '--tw-prose-invert-code': 'var(--color-white)',
            '--tw-prose-invert-pre-code': 'var(--color-pink-300)',
            '--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)',
            '--tw-prose-invert-th-borders': 'var(--color-pink-600)',
            '--tw-prose-invert-td-borders': 'var(--color-pink-700)',
          },
        },
      }),
    },
  },
}

See our internal style definitions for some more examples.

Changing the default class name

If you need to use a class name other than prose for any reason, you can do so using the className option when registering the plugin:

@import 'tailwindcss';
@plugin "@tailwindcss/typography" {
  className: wysiwyg;
}

Now every instance of prose in the default class names will be replaced by your custom class name:

<article class="wysiwyg wysiwyg-slate lg:wysiwyg-xl">
  <h1>My Heading</h1>
  <p>...</p>

  <div class="not-wysiwyg">
    <!-- Some example or demo that needs to be prose-free -->
  </div>

  <p>...</p>
  <!-- ... -->
</article>

Customizing the CSS

If you want to customize the raw CSS generated by this plugin, you can use the JavaScript based theme API. To do that, use the @config directive:

  @import "tailwindcss";
  @plugin "@tailwindcss/typography";
+ @config "./tailwind.config.js";

You can then create your own config by adding a new tailwind.config.js file with the typography section and providing your styles under the css key:

/** @type {import('tailwindcss').Config} */
module.exports = {
  theme: {
    extend: {
      typography: {
        DEFAULT: {
          css: {
            color: '#333',
            a: {
              color: '#3182ce',
              '&:hover': {
                color: '#2c5282',
              },
            },
          },
        },
      },
    },
  },
}

Like with all theme customizations in Tailwind, you can use CSS variables if you need access to access your theme configuration:

/** @type {import('tailwindcss').Config} */
module.exports = {
  theme: {
    extend: {
      typography: {
        DEFAULT: {
          css: {
            color: 'var(--color-gray-800)',
            // ...
          },
        },
      },
    },
  },
}

Customizations should be applied to a specific modifier like DEFAULT or xl, and must be added under the css property. Customizations are authored in the same CSS-in-JS syntax used to write Tailwind v3 plugins.

See the default styles for this plugin for more in-depth examples of configuring each modifier.


Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discuss the Tailwind CSS Typography plugin on GitHub

For casual chit-chat with others using the framework:

Join the Tailwind CSS Discord Server