Skip to content

Commit

Permalink
Add usage with Tailwind documentation
Browse files Browse the repository at this point in the history
Add documentation on how to enable Tailwind IntelliSense inside `clsx` functions

Fixes lukeed#64
  • Loading branch information
edgarlr authored Jan 18, 2023
1 parent 6da37d6 commit 225789e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,28 @@ All browsers that support [`Array.isArray`](https://developer.mozilla.org/en-US/

- [obj-str](https://github.com/lukeed/obj-str) - A smaller (96B) and similiar utility that only works with Objects.

## Tailwind CSS
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>


## License

MIT © [Luke Edwards](https://lukeed.com)

0 comments on commit 225789e

Please sign in to comment.