state
disabled
Sugar over when('&:disabled, &[aria-disabled="true"]', input), applying the given utilities under both the native and ARIA disabled selectors.
import { disabled } from "@sdxc/u/state";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.disabled(u.opacity(50)) | css({ '&:disabled, &[aria-disabled="true"]': { opacity: 0.5 } }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.disabled(u.opacity("2.75rem"))Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.disabled(u.opacity(50)))Signature
u.disabled(input: UtilityInput<Node>)