state
checked
Sugar over when('&:checked, &[aria-checked="true"]', input), matching both native checked controls and ARIA-checked custom widgets.
import { checked } from "@sdxc/u/state";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.checked(u.bg("brand.solid")) | css({ '&:checked, &[aria-checked="true"]': { backgroundColor: "..." } }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.checked(u.bg("brand.solid"))Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.checked(u.bg("brand.solid")))Signature
u.checked(input: UtilityInput<Node>)