Web features explorer

:state()

Newly available since 2024-05-17
Tags: api css Groups: HTML > Custom elements

The :state() CSS pseudo-class matches custom elements based on their custom state, set through the ElementInternals.states API.

Learning resources on MDN

Browser support