Skip to content
This is the alpha v4 version website. Looking for the v3 documentation?

StatePredicate

StatePredicate<S> = keyof S | readonly keyof S[] | Partial<S>

Defined in: packages/sigma/src/types/styles.ts:88

State predicate for conditional styling (whenState / matchState). Shorthand forms only — use when for function predicates.

  • string: Single state flag name (e.g., “isHovered”) - true if flag is true
  • string[]: Array of state flags - true if ALL flags are true (AND logic)
  • object: Map of state flags to expected values (AND logic)

Type Parameters

S

S = BaseNodeState | BaseEdgeState