--- name: tailwindcss-plugins description: Tailwind CSS plugins including official plugins and custom plugin development --- # Tailwind CSS Plugins ## Official Plugins ### @tailwindcss/typography Beautiful typographic defaults for content you don't control (Markdown, CMS content). #### Installation ```bash npm install -D @tailwindcss/typography ``` ```css @import "tailwindcss"; @plugin "@tailwindcss/typography"; ``` #### Basic Usage ```html

Article Title

This content gets beautiful default styles...

``` #### Size Modifiers | Class | Description | |-------|-------------| | `prose-sm` | Smaller text (14px base) | | `prose` | Default (16px base) | | `prose-lg` | Larger text (18px base) | | `prose-xl` | Extra large (20px base) | | `prose-2xl` | Huge (24px base) | ```html
``` #### Color Themes ```html
Gray theme
Zinc theme
Neutral theme
Stone theme
``` #### Dark Mode ```html
``` #### Element Modifiers Override specific elements: ```html
Content
``` #### Max Width Control ```html
Full width content
``` #### Escaping Prose Styles ```html

Styled heading

Styled paragraph

Back to prose styles

``` #### Custom Class Name ```css @plugin "@tailwindcss/typography" { className: wysiwyg; } ``` ```html
Content
``` ### @tailwindcss/forms Resets form elements to a consistent, easily-styleable baseline. #### Installation ```bash npm install -D @tailwindcss/forms ``` ```css @import "tailwindcss"; @plugin "@tailwindcss/forms"; ``` #### Styled Elements The plugin applies styles to: - `input[type='text']` - `input[type='email']` - `input[type='password']` - `input[type='number']` - `input[type='url']` - `input[type='date']` - `input[type='datetime-local']` - `input[type='month']` - `input[type='week']` - `input[type='time']` - `input[type='search']` - `input[type='tel']` - `input[type='checkbox']` - `input[type='radio']` - `select` - `select[multiple]` - `textarea` #### Basic Usage ```html ``` #### Strategy: Class-Based For opt-in styling (doesn't apply global resets): ```css @plugin "@tailwindcss/forms" { strategy: class; } ``` ```html