Open this example in the interactive library
Source code
<style>
.demo[aria-pressed="true"] {
background: #134e4a;
color: white;
}
</style>
<button class="demo" type="button" aria-pressed="true">Pinned</button>
Show a pressed ARIA toggle style with native CSS. The preview includes a small shared demo stylesheet.
Open this example in the interactive library
<style>
.demo[aria-pressed="true"] {
background: #134e4a;
color: white;
}
</style>
<button class="demo" type="button" aria-pressed="true">Pinned</button>