SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

On this page

legendToggle

Position-keyed visibility rules pairing a chart root with a later legend.

tsx
import { legendToggle } from "@sdxc/ui/app";

Usage

Composes the categorical legend-toggle visibility rules as a css() mixin covering every CHART_COLOR_SLOT_COUNT color slot. The general sibling combinator requires the legend to follow the chart root.

Signature

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

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

Examples

tsx
<svg
	mix={[
		legendToggle(),
		css({ display: "block", inlineSize: "100%", blockSize: "auto" }),
	]}
>
	{content}
</svg>;
@sdxc/ui

Can’t find it? Contact us