Skip to content

Repository files navigation

HTML to QuerySelector

Automate your DOM selection! Select an HTML element, name your variable, and pick a JS/TS file—it generates a querySelector for you.

Features

  • Select HTML → Custom variable name → Insert in JS/TS file.
  • Smart file picker with autocomplete.
  • Stays in your current file for smooth workflow.

Usage

  1. Highlight an HTML element (e.g., <div id="myDiv">).
  2. Run Get HTML Selection (or Ctrl+Shift+Q).
  3. Name your variable.
  4. Pick a JS/TS file if needed.

Why?

Saves time, reduces typos, keeps you coding—not copying.

About

VS Code Extension that automatically generates JavaScript variables for HTML elements in your project. Stop typing selectors manually!

Resources

Stars

10 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages