English | 简体中文
20240816-233530.mp4
This is a VSCode extension that provides intelligent insights for Twind.
Why does the name end with Phoenix
? Because it is rising from the ashes, and one day, it will shine as brightly as it once did.
- Intelligent suggestions
- Clear class information
- Color previews
After installing the extension, simply configure it as follows.
{
// [Important] Specify the presets used in the project, such as `tailwind`, ...
"twind-intellisense.presets": ["tailwind", "typography"]
// ... see below for additional configurations
}
-
Description: Enable the extension
-
Type:
boolean
-
Default:
true
-
Description: Presets used in the project
-
Type:
Array<'tailwind' | 'phoenix-tailwind@3.4' | 'tailwind-forms' | 'autoprefix' | 'container-queries' | 'line-clamp' | 'radix-ui' | 'typography'>
-
Default:
["tailwind"]
-
Additional Notes:
If your project uses the
tailwind
preset, be sure to add it.phoenix-tailwind@3.4
corresponds to@phoenix-twind/preset-tailwind
, supports the latesttailwind@3.4
.tailwind
corresponds to@twind/preset-tailwind
, and the others follow similarly.
-
Description: Path to the Twind configuration file
-
Type:
string | undefined
-
Additional Notes:
This should be specified relative to the workspace root.
- You can specify the full path to the configuration file, e.g.,
'path/to/twind.config.js'
- You can specify the directory containing the configuration file, e.g.,
'path/to/'
(it will automatically look fortwind.config.js
ortwind.config.ts
in that directory) - If not specified, it will default to looking for
'twind.config.(js|ts)'
in the workspace root directory
Additionally, even on Windows systems, always use forward slashes (
/
) as path separators - You can specify the full path to the configuration file, e.g.,
-
Description: Color preview configuration
-
Type:
object
-
Properties:
enabled
:- Description: Whether to enable the color preview feature
- Type:
boolean
- Default:
true
-
Example:
{ "twind-intellisense.colorPreview": { "enabled": true } }
-
Description: Configuration for class extraction
-
Type:
object
-
Properties:
prefixes
:- Description: The prefixes of classes to extract, as regex strings. For example:
"class(Name)?="
- Type:
Array<string>
- Description: The prefixes of classes to extract, as regex strings. For example:
ignorePrefixes
:- Description: The prefixes of classes to ignore, as regex strings. For example:
"css(?=`|\()"
- Type:
Array<string>
- Description: The prefixes of classes to ignore, as regex strings. For example:
-
Example:
{ "twind-intellisense.classExtraction": { "prefixes": ["class(Name)?="], "ignorePrefixes": ["css(?=`|()"] } }
- HTML
- JavaScript
- JavaScriptReact
- TypeScript
- TypeScriptReact
- Vue
- Svelte
- SolidJS
- ...
MIT License © 2024-PRESENT xlboy