Cognitive Biases / Scarcity
Scarcity
Urgency / scarcity indicator (time-based countdown, stock count, popularity). Escalates coloring when thresholds cross. Triggers loss-aversion / FOMO.
behavioral v0.9.0
Playground
Examples
Low stock
<bias-scarcity type="stock" remaining="2" threshold="10" pulse></bias-scarcity> Popularity
<bias-scarcity type="popularity" remaining="42" threshold="20"></bias-scarcity> Import
import { BiasScarcity } from '@cognivo/components/bias'; // Or tree-shake: import '@cognivo/components/bias-scarcity'; Per-component imports ship only that component (~8 kB gzip).
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
type | "time" | "stock" | "popularity" | "stock" | Urgency type |
deadline | string (ISO) | — | Deadline for type="time" |
remaining | number | 0 | Count for type="stock" or "popularity" |
threshold | number | 10 | Low-stock warning threshold |
pulse | boolean | false | Animate a pulse dot |