A VS Code extension that visually collapses verbose HTML/JSX class attributes into an inline ellipsis (...), while preserving full discoverability via hover tooltips and enabling seamless click-to-edit workflows.
Features
Visual Collapse: Replace the value of class (HTML) and className (JSX/TSX) attributes with ... when the number of classes exceeds a configurable threshold (default: 3)
Hover Tooltip: When hovering over the collapsed ..., display a tooltip showing the full attribute value with CSS syntax highlighting and an "Edit Attribute" command link
Click-to-Edit: Clicking on the collapsed ... allows you to edit the original attribute value
Smart Expand on Cursor: When your cursor intersects a collapsed attribute range, it temporarily expands (removes decoration) and re-collapses automatically when you move away
Edit Preservation: When editing an attribute, it remains expanded during the entire editing session and only collapses after you move the cursor away
Supported Languages
Language
File Extensions
Attribute Names
HTML
.html, .htm
class
JSX
.jsx
className, class
TSX
.tsx
className, class
Vue
.vue
class
Svelte
.svelte
class
Configuration
Setting
Type
Default
Description
classCollapser.enabled
boolean
true
Enable attribute collapsing
classCollapser.attributes
string[]
["class", "className"]
Attribute names to collapse
classCollapser.threshold
number
3
Minimum number of classes before collapsing
classCollapser.collapseMode
string
"ellipsis"
Visual mode: ellipsis (...), class count (5), or first class name