Skip to content

Commit 496db1d

Browse files
edgarlrlukeed
andauthoredJan 18, 2023
chore: add Tailwind readme section (#65)
* Add usage with Tailwind documentation Add documentation on how to enable Tailwind IntelliSense inside `clsx` functions Fixes #64 * Update readme.md Co-authored-by: Luke Edwards <luke.edwards05@gmail.com> * Update readme.md Co-authored-by: Luke Edwards <luke.edwards05@gmail.com>
1 parent 6da37d6 commit 496db1d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
 

‎readme.md

+21
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,27 @@ All browsers that support [`Array.isArray`](https://developer.mozilla.org/en-US/
7878

7979
>**Note:** For IE8 support and older, please install `clsx@1.0.x` and beware of [#17](https://github.com/lukeed/clsx/issues/17).
8080
81+
## Tailwind Support
82+
83+
Here some additional (optional) steps to enable classes autocompletition using `clsx` with Tailwind CSS.
84+
<details>
85+
86+
<summary>
87+
Visual Studio Code
88+
</summary>
89+
90+
1. [Install the "Tailwind CSS IntelliSense" Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
91+
92+
2. Add the following to your [`settings.json`](https://code.visualstudio.com/docs/getstarted/settings):
93+
94+
```json
95+
{
96+
"tailwindCSS.experimental.classRegex": [
97+
["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
98+
]
99+
}
100+
```
101+
</details>
81102

82103
## Related
83104

0 commit comments

Comments
 (0)
Please sign in to comment.