What problem does it solve?
Stable selectors solve brittle element targeting across frameworks by using semantic data attributes suitable for analytics, tests, and AI automation.
Core Features & Use Cases
- Framework-agnostic data attributes: data-component, data-element, data-action, data-state to reliably identify interactive elements across React, Angular, Vue, Svelte, Next.js, Astro, and SSR templates.
- Cross-tooling readiness: Enables Fullstory searches, stable E2E test selectors, and AI agent navigation without framework-specific plugins.
- Real-world use: Apply stable selectors to a ProductCard for durable automation across UI changes and deployments.
Quick Start
Annotate UI components by adding data-component on the root element and data-element on key interactive elements. Include data-action and data-state where applicable to describe interactions and states. Use a simple example pattern from the guidance to implement consistent naming across the codebase.