From 496db1dd7441cb42421cb731cbf4fd1d010e1e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20L=C3=B3pez?= Date: Wed, 18 Jan 2023 16:56:20 -0600 Subject: [PATCH] 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 * Update readme.md Co-authored-by: Luke Edwards --- readme.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/readme.md b/readme.md index cba8d87..d3839be 100644 --- a/readme.md +++ b/readme.md @@ -78,6 +78,27 @@ All browsers that support [`Array.isArray`](https://developer.mozilla.org/en-US/ >**Note:** For IE8 support and older, please install `clsx@1.0.x` and beware of [#17](https://github.com/lukeed/clsx/issues/17). +## Tailwind Support + +Here some additional (optional) steps to enable classes autocompletition using `clsx` with Tailwind CSS. +
+ + + Visual Studio Code + + +1. [Install the "Tailwind CSS IntelliSense" Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss) + +2. Add the following to your [`settings.json`](https://code.visualstudio.com/docs/getstarted/settings): + + ```json + { + "tailwindCSS.experimental.classRegex": [ + ["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"] + ] + } + ``` +
## Related