sdxc

Type to search, or start from one of these:

state

required

Sugar over when('&:required, &[aria-required="true"]', input), matching required controls and widgets.

import { required } from "@sdxc/u/state";

Quick reference

Every documented call, beside the CSS it emits.

CallCSS
u.required(u.fg("danger"))css({ '&:required, &[aria-required="true"]': { color: "..." } })

Using a custom value

Every scale argument also takes a raw CSS value, which passes through untouched.

u.required(u.fg("danger"))

Responsive design

Wrap the call in a container query to scope it to one width.

u.at("md", u.required(u.fg("danger")))

Signature

u.required(input: UtilityInput<Node>)