About the Tailwind CSS Playground tool
Tailwind CSS makes it quick to style a page with utility classes, but setting up a project with a build step just to try a few classes is slow. This Tailwind playground lets you write HTML with Tailwind classes and see the styled result instantly, without installing anything.
The preview loads the official Tailwind CSS v3 Play CDN script, which scans your HTML and generates the CSS for the classes you use on the fly. That means responsive prefixes like md: and lg:, hover: and focus: states, arbitrary values such as w-[437px] and gradients all work. A second “Tailwind CSS” tab accepts custom CSS processed by Tailwind, so you can use @apply, @layer and theme() to build component classes like .btn-primary.
Switch the preview between full width, tablet and phone to test breakpoints, check the console for errors and download the page as a single HTML file. Your code runs in a sandboxed frame in your browser. The Tailwind script itself comes from cdn.tailwindcss.com, and the Play CDN is intended for prototyping rather than production sites.
How to use Tailwind CSS Playground
- Edit the sample card in the “HTML” tab, adding or changing Tailwind classes.
- Add component classes with @apply in the “Tailwind CSS” tab if you need them.
- Watch the “Live preview” and switch to tablet or phone width to test responsive prefixes.
- Click “Download” to save a standalone HTML file that uses the Play CDN.
Features
Full Tailwind utility set
Every Tailwind v3 class, variant and arbitrary value is generated as you type.
@apply support
Write custom classes in a Tailwind-processed style block.
Responsive preview
Test sm:, md: and lg: breakpoints at phone, tablet and full widths.
Console output
See errors and logs from any scripts you add to the HTML.
Single-file download
Export a working HTML page to keep or share.
When to use it
- Try Tailwind classes while learning the framework.
- Prototype a card, navbar or pricing table before adding it to a project.
- Convert a design mockup to Tailwind markup quickly.
- Reproduce a Tailwind styling issue in a minimal example.
- Compare a design in Tailwind with the same layout in Bootstrap.
Frequently asked questions
Which Tailwind version does the playground use?
It uses the Tailwind CSS v3 Play CDN from cdn.tailwindcss.com, which generates styles in the browser.
Can I use tailwind.config options?
The Play CDN reads a tailwind.config object set in a script. You can add <script>tailwind.config = { theme: { extend: {} } }</script> to the HTML tab.
Is the downloaded file production-ready?
It works, but the Play CDN generates CSS at runtime and is not recommended for production. Use the Tailwind CLI, PostCSS or a framework integration for real sites.
Do Tailwind plugins like typography work?
The Play CDN supports official plugins through a URL parameter such as ?plugins=typography, which you can add to a script tag in your HTML.
What does the privacy note mean?
The preview downloads the Tailwind script from cdn.tailwindcss.com, so that server sees the request. Your HTML itself is not sent anywhere.