1# Tailwind CSS
2
3Zed has built-in support for Tailwind CSS autocomplete, linting, and hover previews.
4
5- Language Server: [tailwindlabs/tailwindcss-intellisense](https://github.com/tailwindlabs/tailwindcss-intellisense)
6
7## Configuration
8
9To configure the Tailwind CSS language server, refer [to the extension settings](https://github.com/tailwindlabs/tailwindcss-intellisense?tab=readme-ov-file#extension-settings) and add them to the `lsp` section of your `settings.json`:
10
11```jsonc
12{
13 "lsp": {
14 "tailwindcss-language-server": {
15 "settings": {
16 "classFunctions": ["cva", "cx"],
17 "experimental": {
18 "classRegex": ["[cls|className]\\s\\:\\=\\s\"([^\"]*)"],
19 },
20 },
21 },
22 },
23}
24```
25
26Languages which can be used with Tailwind CSS in Zed:
27
28- [Astro](./astro.md)
29- [CSS](./css.md)
30- [ERB](./ruby.md)
31- [HEEx](./elixir.md#heex)
32- [HTML](./html.md)
33- [TypeScript](./typescript.md)
34- [JavaScript](./javascript.md)
35- [PHP](./php.md)
36- [Svelte](./svelte.md)
37- [Vue](./vue.md)
38
39### Prettier Plugin
40
41Zed supports Prettier out of the box, which means that if you have the [Tailwind CSS Prettier plugin](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) installed, adding it to your Prettier configuration will make it work automatically:
42
43```json
44// .prettierrc
45{
46 "plugins": ["prettier-plugin-tailwindcss"]
47}
48```