The feature lets custom elements expose their states via the :state() CSS pseudo class.


Built-in elements have certain “states” that can change over time depending on user interaction and other factors, and are exposed to web authors through pseudo classes. For example, some form controls have the “invalid” state, which is exposed through the :invalid pseudo class. Like built-in elements, custom elements may also have states, and web authors want to expose these states in a similar fashion to the built-in elements.



Specification link

Specification being incubated in a Community Group

Status in Chromium


Enabled by default (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • No signal
  • No signal
  • Positive


Intent to Prototype url

Intent to Prototype thread

Search tags

custom element, custom state,

Last updated on 2021-12-13