# TailwindPHP > TailwindPHP is a port of TailwindCSS 4.x to PHP. It scans your markup and generates Tailwind utility CSS in pure PHP, with no Node.js and no build step. ## Pages - [Home](https://tailwindphp.inline0.dev/) ## Documentation - [Introduction](https://tailwindphp.inline0.dev/docs.md): A 1:1 port of TailwindCSS 4.x to PHP. Generate Tailwind utility CSS with pure PHP — no Node.js, no build step — plus cn(), tailwind-merge, CVA, and the typography and forms plugins. - [Getting Started](https://tailwindphp.inline0.dev/docs/getting-started.md): Install TailwindPHP with Composer and generate your first Tailwind CSS from PHP — no Node.js, no build step, no config file. - [Overview](https://tailwindphp.inline0.dev/docs/usage.md): Generate Tailwind CSS from your content — scan markup for class names, pass optional CSS configuration, and get back only the CSS you use. - [Theme & Customization](https://tailwindphp.inline0.dev/docs/usage/theme.md): Define design tokens with @theme, read them in CSS with theme() and the --theme/--spacing/--alpha functions, and inspect resolved values from PHP. - [Directives](https://tailwindphp.inline0.dev/docs/usage/directives.md): Inline utilities with @apply, register custom utilities with @utility, define variants with @custom-variant, and control cascade order with @layer. - [Imports & Virtual Modules](https://tailwindphp.inline0.dev/docs/usage/imports.md): Resolve @import in your CSS — virtual modules, file imports via importPaths, custom resolvers, Preflight, and per-import modifiers. - [The @source Directive](https://tailwindphp.inline0.dev/docs/usage/source.md): Use @source in your input CSS to control which template files are scanned for class names and which candidates are forced in or excluded. - [Overview](https://tailwindphp.inline0.dev/docs/class-utilities.md): cn(), merge(), and join() for building and de-conflicting Tailwind class strings in PHP — PHP ports of clsx and tailwind-merge, no JS toolchain required. - [Variants](https://tailwindphp.inline0.dev/docs/class-utilities/variants.md): variants() and compose() — a PHP port of CVA (Class Variance Authority) for declarative, multi-axis component styles built on base, variants, compoundVariants, and defaults. - [Overview](https://tailwindphp.inline0.dev/docs/plugins.md): Load the official typography and forms plugins with the @plugin directive, pass options via CSS blocks, and register your own PHP plugin classes. - [Typography Plugin](https://tailwindphp.inline0.dev/docs/plugins/typography.md): The @tailwindcss/typography port adds the prose classes — typographic defaults for rendered HTML — with size, color, and invert modifiers. - [Forms Plugin](https://tailwindphp.inline0.dev/docs/plugins/forms.md): The @tailwindcss/forms port resets native form controls to a consistent baseline so inputs, selects, checkboxes, and radios are easy to style with utilities. - [Custom Plugins](https://tailwindphp.inline0.dev/docs/plugins/custom.md): Write your own plugin by implementing PluginInterface and using the PluginAPI to register utilities, components, and variants, then load it with @plugin. - [Overview](https://tailwindphp.inline0.dev/docs/advanced.md): The internals of TailwindPHP — how the port mirrors TailwindCSS file-for-file, the compilation pipeline, caching, minification, performance, and compatibility. - [Architecture](https://tailwindphp.inline0.dev/docs/advanced/architecture.md): How TailwindPHP mirrors TailwindCSS file-for-file, the compilation pipeline, the lightningcss equivalent, and where the PHP port deviates. - [Caching & Minification](https://tailwindphp.inline0.dev/docs/advanced/caching.md): The file-based output cache (cache, cacheTtl, clearCache), the compiler state cache (stateCacheFile), and the CSS minifier that shrinks output for production. - [Performance & Testing](https://tailwindphp.inline0.dev/docs/advanced/performance.md): PHP-specific optimizations that preserve identical output, and the extraction-based test loop that keeps the port in lockstep with TailwindCSS. - [Compatibility & Upgrading](https://tailwindphp.inline0.dev/docs/advanced/compatibility.md): Requirements, the TailwindCSS version TailwindPHP tracks, the known differences from TailwindCSS, and what changes when you upgrade between releases. - [CLI](https://tailwindphp.inline0.dev/docs/cli.md): The bin/tailwindphp command — builds, watches, and minifies CSS from an input file with the @tailwindcss/cli options and no Node.js. - [API](https://tailwindphp.inline0.dev/docs/api.md): The full TailwindPHPtw static API — generate, compile, properties, computed values, theme inspectors, caching — plus the reusable TailwindCompiler instance. ## Optional - [Full documentation](https://tailwindphp.inline0.dev/llms-full.txt): Markdown source of every documentation page in one file, 116 KB, about 29,000 tokens