Frequently Asked Questions

💡 Didn't find your answer? Try GitHub discussions, our issues tracker, or ask the community in our discord channel.


Why not just TailwindCSS?

We, in no way, discourage the use of TailwindCSS. In fact, we think everyone should try Tailwind before they try Twind. It is an absolutely incredible tool with amazing documentation and the entire backbone of this project!

Twind takes a different approach by removing the build step and generating the styles at run-time, which can be a useful approach for existing apps built on frameworks.

We encourage you to try both and see which one is a better fit for you and your project.

How is Twind different from TailwindCSS?

Twind works with all existing Tailwind classes and configuration. However, Twind offers extended utilities, variants, and syntaxes which are all listed in the Extended Functionality Guide.

How does CSS-in JS perform? Is it slow?

Twind was designed with performance in mind from the start and is in the top two fastest CSS-in-JS solutions. We've put together some benchmarks if you are interested in learning more.

Is this the same as writing style attributes?

Coming soon...

Does Twind work with XYZ framework or library?

If your project uses JavaScript/TypeScript, it should work with Twind. This includes vanilla JavaScript/TypeScript, React, React Native, Vue, Angular, Solid, AlpineJS, NextJS, Gatsby, Nuxt, 11ty, and virtually any other JavaScript framework.

Please note that usage with some frameworks, including SSR frameworks, requires additional configuration. We've put together several usage guides to help get you started.

How is browser support for Twind?

Twind works with all major browsers but requires a polyfill for IE11 and some older browsers. Please see the Legacy Browsers guide for more information.

Does Twind support dark mode?

Yes! With Twind, dark mode is always available. Please see the configuration guide for more info.

Does Twind support Tailwind V2 colors?

Yes, but with a little extra configuration. Please check out the configuration guide for more info.

Does Twind support TypeScript?

Yes, Twind is written in TypeScript and includes all type definitions with the modules. Please see the TypeScript usage guide for more info on how to use Twind in your TypeScript app.


How do I get started using Twind?

We've put together a Getting Started guide to get you up in running in under a minute.

How do I migrate my existing project to Twind?

We've put together a Tailwind Migration Guide and are working on more.

How do I write raw CSS in Twind?

Tailwind provides a twind/css package to help you incorporate raw CSS into your project. This package exposes a css function that lets you define your CSS using JavaScript object notation. Please check out our CSS-in-Twind Guide for more information.

How do I write global styles in Twind?

Twind provides a first-class approach to writing global styles via the twind/css module.

We've put together a Global Styles Guide for your convenience.

How do I override a style in Twind?

Twind provides several ways to override styles, including an !important modifier, apply function, and override variant.

Please see the Overwriting Styles Guide for more information.

How do I access a theme value in Twind?

The twind/css package exposes a theme helper for use with the css function. View the docs here.

How do I use Twind with server-rendered (SSR) apps?

Twind provides a twind/server package to assist with static extraction needed for SSR apps. Please see the SSR Usage Guide for more information.

There is also a working example Next App to get you up in running.

When should I use the shim and are there any downsides?

The purpose of the shim is to allow you to take advantage of Twind without the use of the tw function. This is useful for certain situations:

  • You are incrementally refactoring an existing Tailwind app.
  • You just want to get up and running quickly (prototyping)

There could be performance implications of using the shim on large or highly dynamic apps due to a requirement to parse entire class attributes. However, these differences should be negligible for most static sites.

Please check out The Shim Guide for more information.


Is there a Twind VSCode extension for syntax highlighting, style validation/linting, auto-completion, etc..?

Yes, get it here.


Does Twind have an online community?

Yes, we are active both on Github Discussions and Discord.

How can I contribute to this project?

Hey, thanks for your interest! There are several ways that you can contribute to this project from spreading the word to fixing bugs to creating new features. We've put together a Contributing Guide to get you started.