DOCS
v0.4

Cognitive Biases / Scarcity

Scarcity

Urgency / scarcity indicator (time-based countdown, stock count, popularity). Escalates coloring when thresholds cross. Triggers loss-aversion / FOMO.

behavioralv0.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

PropTypeDefaultDescription
type"time" | "stock" | "popularity""stock"Urgency type
deadlinestring (ISO)Deadline for type="time"
remainingnumber0Count for type="stock" or "popularity"
thresholdnumber10Low-stock warning threshold
pulsebooleanfalseAnimate a pulse dot