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
classattribute.Autocompletion in objects by prefixing them with
/*tw*/or/* tw */.Autocompletion inside the
configprop.
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
Install Tailwind CSS IntelliSense extension.
Add the following extension configuration to your VSCode settings.
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