Skip to content

Commit

Permalink
chore: add Tailwind readme section (#65)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
edgarlr and lukeed committed Jan 18, 2023
1 parent 6da37d6 commit 496db1d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
<details>

<summary>
Visual Studio Code
</summary>

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\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
]
}
```
</details>

## Related

Expand Down

0 comments on commit 496db1d

Please sign in to comment.