Class autocompletion

IntelliSense

If you’re using VSCode or JetBrains IDEs (WebStorm, PHPStorm, etc.), you can set up class autocompletion.

Benefits:

  • Autocompletion when typing in the class attribute.

  • Autocompletion in objects by prefixing them with /*tw*/ or /* tw */.

  • Autocompletion inside the config prop.

Example of an SFC with IntelliSense:

<template>
  <UCard :config="config" />
</template>

<script setup>
const config = /*tw*/ {
  card: 'bg-white dark:bg-slate-900'
}
</script>

VSCode

JetBrains IDEs

  • Ensure the Tailwind CSS IntelliSense extension is installed in your IDE. If it’s not, install it.

  • Add the following extension configuration below in Settings > Languages & Frameworks > Style Sheets > Tailwind CSS.

Last updated