A VS Code extension that enhances the development experience when working with TSX (TypeScript + React) and SCSS modules by providing intelligent class name management, navigation, and refactoring tools.
- Add new CSS classes directly from your TSX files
- Quickly select existing classes from your SCSS module
- Intelligent class name suggestions based on your SCSS module structure
- Automatic creation of new blocks and elements in SCSS
- Go to definition for class names (from TSX to SCSS)
- Find references for class names (both directions)
- Side-by-side editing of TSX and corresponding SCSS files
- Rename class names with full project awareness
- Automatic updates of class names across all files
- Quick component scaffolding with matching TSX and SCSS files
tsx-styles-extension.newClassName: Add a new CSS class at cursor positiontsx-styles-extension.selectClassName: Select an existing class name from your SCSS moduletsx-styles-extension.showComponentNameInput: Create a new component (available in Explorer context menu)
The extension adds context-sensitive actions when working with JSX/TSX files:
- Right-click in a TSX file to access class name management commands
- Right-click on a folder in Explorer to create new components
(You may want to add your preferred keybindings in your keybindings.json)
- VS Code 1.60.0 or higher
- TypeScript React (.tsx) files
- SCSS Modules (.module.scss) files
- Open VS Code
- Go to the Extensions view (
Ctrl+Shift+XorCmd+Shift+X) - Search for "TSX Styles Extension"
- Click Install
The extension works with zero configuration, but you can customize these settings in your VS Code settings.json:
{
"tsx-styles-extension.someSetting": "value"
}- Currently no known issues. Please report any problems you encounter.
Initial release with basic functionality:
- Class name management
- Navigation between TSX and SCSS
- Basic refactoring support
- Component scaffolding
Contributions are welcome! Please open issues or pull requests on our GitHub repository.
MIT