API Reference
Tailwind CSS
A utility-first CSS framework that scans templates and generates only the classes actually used.
Official Documentation ↗CompatibilityThis documentation covers version
v4.3.4. Check the official docs for the latest API surface.Installation
npm
npm install tailwindcssMethods
No methods match this filter.
Tailwind generates utility classes on demand from a content configuration, keeping CSS small.
Key Features
- Utility classes generated on demand
- content globs drive JIT scanning
- Theme and plugin configuration
Usage Notes
Pin a version and check the official docs for the API surface you depend on before upgrading.
FAQ
- Why are my dynamic classes missing?
- Tailwind scans source text literally, so class names built by string concatenation are invisible. Write full class names or add them to a safelist.
- How do I add custom colors?
- Extend theme.colors in tailwind.config.js; utilities such as bg-brand then become available without writing CSS.
- Does it ship its own reset?
- Yes. The preflight base layer normalizes browser defaults so utilities behave consistently across engines.
Report a problem with this API docOpens a pre-filled issue on GitHub.