Auto-generate unique class/id names for HTML elements and provide CSS selector autocomplete.
- Generate unique class/id names from a command.
- Auto-insert class/id names when you type an empty class="" / className="" or id="" attribute.
- Use HTML tag names as the prefix (optional).
- CSS/SCSS/LESS autocomplete for class and id selectors.
- Emmet-style completions in HTML/JSX/TSX/Vue (e.g.,
div.orsection#).
- Run HTML Element Namer: Generate Unique Class/ID Name from the Command Palette.
- Default keybinding: Cmd+Shift+G (macOS) / Ctrl+Shift+G (Windows/Linux).
- Enable the setting
html-element-namer.autoGenerate. - Type
class="",className=""(React), orid=""in HTML/JSX/TSX/Vue. - A unique name is inserted automatically.
html-element-namer.autoGenerate: Enable auto-insertion when typing empty class/id attributes.html-element-namer.autoPrefix: Prefix for generated names (default:elem).html-element-namer.autoPrefixMode:fixedorelementto use the HTML tag name.
- Initial release.