Use when installing, configuring, or customising any of the four official Tailwind plugins: @tailwindcss/typography (prose classes for rendered Markdown), @tailwindcss/forms (form-input/select/checkbox base reset), @tailwindcss/container-queries (@container variants), @tailwindcss/aspect-ratio (legacy aspect-w-*/aspect-h-* syntax). Prevents the v3-syntax-in-v4 trap (require() arrays do not work in v4, you need @plugin), the missing-plugin trap (forgetting to add container-queries to v3 silently emits zero @-variant classes), the unneeded-plugin-in-v4 trap (installing container-queries or aspect-ratio in v4 wastes bundle size and ships duplicated utilities), the forms-strategy mismatch (strategy base auto-styles every form element globally, strategy class only adds form-* classes), the not-prose escape miss (Markdown rendered inside a button or card inherits prose typography unintentionally), and the typography theme-customisation confusion (v3 uses theme.typography in JS, v4 uses @plugin block syntax). Covers
Instrucciones de origen · Vista previa de solo lectura
name
tailwind-impl-plugins-official
description
Use when installing, configuring, or customising any of the four official Tailwind plugins: @tailwindcss/typography (prose classes for rendered Markdown), @tailwindcss/forms (form-input/select/checkbox base reset), @tailwindcss/container-queries (@container variants), @tailwindcss/aspect-ratio (legacy aspect-w-*/aspect-h-* syntax). Prevents the v3-syntax-in-v4 trap (require() arrays do not work in v4, you need @plugin), the missing-plugin trap (forgetting to add container-queries to v3 silently emits zero @-variant classes), the unneeded-plugin-in-v4 trap (installing container-queries or aspect-ratio in v4 wastes bundle size and ships duplicated utilities), the forms-strategy mismatch (strategy base auto-styles every form element globally, strategy class only adds form-* classes), the not-prose escape miss (Markdown rendered inside a button or card inherits prose typography unintentionally), and the typography theme-customisation confusion (v3 uses theme.typography in JS, v4 uses @plugin block syntax). Covers each plugin's complete public surface: prose size modifiers (prose-sm to prose-2xl), color themes (prose-gray, prose-slate, prose-zinc, prose-neutral, prose-stone, prose-invert), element-level modifiers (prose-headings, prose-a, prose-img, prose-code), forms strategies (base vs class), form-input/textarea/select/multiselect/ checkbox/radio classes, container-queries variants (@xs to @7xl, arbitrary @[400px], named containers @container/sidebar), aspect-ratio legacy syntax (aspect-w-16 aspect-h-9), v4 native replacements (aspect-video, aspect-square, aspect-[16/9]), and v3-to-v4 install translation for every plugin. Keywords: tailwindcss typography, tailwindcss forms, tailwindcss container queries, tailwindcss aspect ratio, prose, prose-sm, prose-lg, prose-xl, prose-2xl, prose-invert, prose-gray, prose-slate, prose-zinc, prose-neutral, prose-stone, prose-headings, prose-a, prose-img, prose-code, not-prose, max-w-none, form-input, form-select, form-textarea, form-checkbox, form-radio, form-multiselect, strategy base, strategy class, @container, @sm variant, @md variant, @lg variant, @[400px], named container, container/sidebar, aspect-w, aspect-h, aspect-video, aspect-square, aspect-ratio plugin, @plugin directive, @plugin typography, @plugin forms, require typography, require forms, my prose styles not showing, form input not styled, container query not working, aspect ratio iframe responsive, how do I add markdown styles tailwind, how to style form inputs tailwind, responsive video embed tailwind, install tailwind typography plugin v4, install tailwind forms plugin v4
license
MIT
compatibility
Designed for Claude Code. Requires Tailwind CSS v3.4 or v4.0+.
metadata
{"author":"OpenAEC-Foundation","version":"1.0"}
Tailwind Official Plugins
Four plugins ship from @tailwindlabs :
Plugin
Purpose
v3 status
v4 status
@tailwindcss/typography
prose class for rendered Markdown
Plugin
Plugin
@tailwindcss/forms
Form-element base reset
Plugin
Plugin
@tailwindcss/container-queries
@container + @md: variants
Plugin
BUILT-IN (do not install)
@tailwindcss/aspect-ratio
aspect-w-* / aspect-h-* legacy syntax
Plugin
DEPRECATED (use native aspect-*)
ALWAYS check the version row before installing. Two of the four are
the wrong choice for new v4 code.
Companion skills :
tailwind-impl-config-v3 : where to register plugins in JS config
tailwind-impl-config-v4 : @plugin directive in CSS-first config
npm install -D @tailwindcss/container-queries
# only install aspect-ratio if you need legacy syntax for Safari < 14.1
Decision Tree : Which Plugin Do I Need
Rendering Markdown / CMS content with default-styled HTML ?
-> @tailwindcss/typography (prose)
Styling form inputs, selects, checkboxes ?
-> @tailwindcss/forms
Need element-size-relative responsive styling ?
├── v3 -> @tailwindcss/container-queries
└── v4 -> Built-in, NO plugin needed
Need aspect-ratio constraint on a container with child ?
├── v3 modern -> Native aspect-* utilities (no plugin)
├── v3 legacy + Safari < 14.1 fallback -> @tailwindcss/aspect-ratio
└── v4 -> Native aspect-* utilities ONLY
Plugin 1 : @tailwindcss/typography (prose)
Purpose
Adds the prose class. Apply to a wrapper element and every nested
HTML element (h1, p, ul, code, pre, blockquote, img, etc.)
gets sensible default typography. Designed for rendered Markdown or
CMS-output where you cannot put utility classes on individual elements.
<articleclass="prose"><p>Markdown text</p><divclass="not-prose"><!-- Manually-styled UI block, prose styles do not apply here --><buttonclass="px-3 py-1 bg-blue-500 text-white">Action</button></div></article>
Width control
Prose ships a 65-character max-width. Override with max-w-none :
Normalises form-element styling across browsers so Tailwind utilities
can style them without each consumer needing appearance: none and
extensive resets.
Two strategies
strategy: "base" -> Resets EVERY form element globally.
No class required.
Adds: type=text, textarea, select, checkbox, radio.
strategy: "class" -> Only adds form-* classes.
Must apply form-input, form-select, etc. explicitly.
Adds the @container class to mark an element as a container, plus
variants @sm:, @md:, @lg:, etc. to style based on the container's
size instead of the viewport.
CRITICAL : v4 does NOT need this plugin
In v4 container queries are part of the framework. Installing this
plugin in a v4 project DOES NOTHING USEFUL and adds bundle weight.
/* v4 entry CSS */@import"tailwindcss";
/* DO NOT add @plugin "@tailwindcss/container-queries"; */
<divclass="@container"><divclass="@[400px]:bg-blue-500">Blue when container >= 400px</div></div>
Named containers
<divclass="@container/sidebar"><mainclass="@container/main"><divclass="@lg/sidebar:hidden @md/main:flex"><!-- Hidden when 'sidebar' container >= 32rem ;
Flex when 'main' container >= 28rem --></div></main></div>
Plugin 4 : @tailwindcss/aspect-ratio (DEPRECATED in v4)
Purpose (legacy)
Pre-v3.0, the only way to set an aspect ratio on a child element
(typically an iframe or video embed) was the padding-bottom hack. This
plugin provided aspect-w-* and aspect-h-* to wrap that hack.
v3 status
Tailwind v3.0 added native aspect-ratio utilities (aspect-video,
aspect-square, aspect-[16/9]). The plugin is INSTALLED ONLY when
you need Safari < 14.1 fallback support, which uses the
padding-bottom technique.
v4 status
DEPRECATED. Native CSS aspect-ratio is universally supported
(Safari 15+, Chrome 88+, Firefox 89+) and v4 targets only modern
browsers. NEVER install this plugin in a v4 project.