Cognitive Biases / Anchoring
Anchoring
Reference-price wrapper. Shows a struck-through anchor value next to a prominent current value with optional savings label. Triggers anchoring bias.
behavioral v0.9.0
Playground
Examples
Price anchoring
<bias-anchoring anchor="$199" current="$99" label="Save 50%" variant="emphasized"></bias-anchoring> Import
import { BiasAnchoring } from '@cognivo/components/bias'; // Or tree-shake: import '@cognivo/components/bias-anchoring'; Per-component imports ship only that component (~8 kB gzip).
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
anchor | string | — | Reference value (shown struck-through) |
current | string | — | Actual value (emphasized) |
label | string | — | Optional savings label (e.g. "Save 50%") |
orientation | "horizontal" | "vertical" | "horizontal" | Layout direction |
variant | "default" | "subtle" | "emphasized" | "default" | Visual weight |