Skip to content

Instantly share code, notes, and snippets.

@dac09
Created June 2, 2021 12:22
Show Gist options
  • Save dac09/b91460de84490bab11e83524d33c0d44 to your computer and use it in GitHub Desktop.
Save dac09/b91460de84490bab11e83524d33c0d44 to your computer and use it in GitHub Desktop.
Tailwind Classname Autocompletion
"tailwindCSS.experimental.classRegex": [
"tw`([^`]*)", // tw`...`
"tw=\"([^\"]*)", // <div tw="..." />
"tw={\"([^\"}]*)", // <div tw={"..."} />
"tw\\.\\w+`([^`]*)", // tw.xxx`...`
"tw\\(.*?\\)`([^`]*)", // tw(Component)`...`
".*ClassName=\"([^\"]*)", // <div activeClassName="..." />
["class[nN]ames\\(([^)]*)\\)", "'([^']*)'"] // classNames('..', '..')
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment