Attribute Selector

Attribut selector

We can use attribute selector in your class name by using[attribute-selector] e.g [data-state=open]-color-red For an example:-

<div class="[data-state=close]-display-none" data-state="open"> i will not display when data-state="close"</div>
<div class="[class~=code]-font-mono mono"> <code>x+y=z</code></div>

Note: quotes ' and "inside attribute selector className is not allowed.