SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

On this page

semanticColorPanel

The border, tinted background, and emphasized foreground a bordered, tinted panel.

tsx
import { semanticColorPanel } from "@sdxc/ui/styles";

Usage

Composes every &[data-color="..."] branch a tinted panel keys its border, background, and foreground on, one branch per SemanticColor, built from @sdxc/u's border()/bg()/fg() utilities nested under when().

Signature

typescript
semanticColorPanel<Node extends Element = Element>(): MixinDescriptor<
	Node,
	[styles: CSSStyles],
	ElementProps
>

Returns a css() mixin ready for a host element's mix prop.

Examples

tsx
<div
	data-color="danger"
	mix={[
		semanticColorPanel(),
		css({
			display: "flex",
			borderRadius: "var(--ui-radius-lg, 0.5rem)",
		}),
	]}
>
	{children}
</div>;
@sdxc/ui

Can’t find it? Contact us