sdxc

Type to search, or start from one of these:

color

caret-color

Sets caret-color for an editable field, resolving a tone at its fg weight.

import { caretColor } from "@sdxc/u/color";

Quick reference

Every documented call, beside the CSS it emits.

CallCSS
u.caretColor()css({ caretColor: "auto" })
u.caretColor("brand")css({ caretColor: "var(--ui-brand-fg)" })
u.caretColor("brand.emphasis")css({ caretColor: "var(--ui-brand-fg-emphasis)" })
u.caretColor("color.neutral.50")css({ caretColor: "var(--ui-color-neutral-50)" })

Using a custom value

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

u.caretColor()

Applying on a state

Wrap the call in a state utility to scope it to one selector.

u.hover(u.caretColor())

Responsive design

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

u.at("md", u.caretColor())

Customizing the theme

The custom properties this utility reads, which a theme redefines.

Variable
--ui-brand-fg
--ui-brand-fg-emphasis
--ui-color-neutral-50

Signature

u.caretColor(value?: ColorValue | (string & {}))