Skip to Content
🚀 idomatic adds stable, readable id attributes so your tests stop breaking.
Works with Playwright · Cypress · Testing Library

Stable id attributes,
added automatically.

idomatic scans your React, HTML, Vue & Angular code and injects human-readable, deterministic id attributes — so your Playwright & Cypress tests stop breaking when the DOM shifts.

$
Input
1function LoginForm() {
2 return (
3 <form>
4 <h1>Sign in</h1>
5 <input name="email" placeholder="Email" />
6 <button aria-label="Submit login">Log in</button>
7 </form>
8 );
9}
idomatic v1.0.0
Ready
...
Monthly Downloads
...
GitHub Stars
...
Latest Version
...
Forks

Why use idomatic?

Speed up your test automation and maintain clean markup with zero effort.

Semantic, readable IDs
Names come from context — aria-label, name, text or tag — so you get button-submit-login, not a random hash.
Idempotent & test-ready
Re-runs never rename or duplicate existing IDs, so diffs stay clean and your Playwright & Cypress selectors stay stable.
Framework-aware
React, HTML, Vue and Angular — JSX/TSX is rewritten through a real AST, not string hacks.
One command, safe by default
Run npx idomatic scan. Preview every change with --dry before you write.

Built for real-world use cases

Whether you're writing tests, improving accessibility, or debugging — idomatic has you covered.

E2E Testing

Stable selectors for Cypress, Playwright, and Selenium. No more flaky tests due to changing class names.

cy.get('#login-btn').click()

Accessibility

Proper IDs enable better screen reader navigation and ARIA label associations.

<label for="email-input">

Debugging

Quickly identify elements in DevTools. Meaningful IDs make debugging a breeze.

document.querySelector('#error-msg')

Team Collaboration

Consistent naming conventions across your codebase. Everyone speaks the same language.

Standardized ID patterns

CI/CD Integration

Run idomatic in your pipeline to ensure all new components have proper IDs before merge.

npx idomatic scan --dry

Analytics & Tracking

Reliable element identification for analytics tools and heatmap tracking.

trackClick('#cta-button')

How idomatic works

From install to improved markup — here's how simple it is.

1
Initialize
npm init @idomatic

Choose your framework: React/JSX or HTML/Vue/Angular. A config file is generated.

2
Customize config
{
"attributeName": "id",
"idStrategy": "semantic",
"prefix": "",
"excludeTags": ["html", "head", "script"]
}

Adjust the rules in .idomatic.config.json to match your project structure.

3
Scan your code
npx idomatic scan

Run a full scan or preview which files will be modified using the --dry flag.

What it supports

idomatic is built for the modern frontend ecosystem — with more support on the way.

Currently Supported
  • JavaScript / JSX / TSX
  • React & React Native
  • HTML
  • Vue
  • Angular
Coming Soon
  • Svelte
    Soon
  • Astro
    Soon
  • Handlebars
    Soon
  • SolidJS
    Soon

Frequently Asked Questions

Got questions? We've got answers.

Ready to automate your IDs?

Stop adding IDs manually.
Start shipping faster.

Join developers who save hours every week by automating their ID attributes. Get started in under a minute.

npm init @idomatic
Open SourceMIT LicenseTypeScript ReadyZero Dependencies