Harmonia UI
Interfaces that adapt to human capacity.
Four inputs — cognitive, temporal, emotional, valence — derive a coherent interface mode. Components adapt density, motion, contrast, and focus. No guessing. No profiles. No surveillance.
Derivation pipeline
Package
Now on npm
npmInstall the capacity system, hooks, and components into any React project. Requires React 18+ and @renge-ui/tokens.
1 — Install
npm
pnpm
2 — Setup
In your root layout, import the token CSS and wrap with CapacityProvider.
3 — Add capacity controls
Drop <CapacityControls /> anywhere in your app — it renders a floating panel (bottom-right) where users manually adjust their cognitive, temporal, emotional, and valence state.
4 — Use
Call useDerivedMode() in any component to read the current interface mode tokens.
Interactive
Live Demo
Adjust the capacity controls (bottom-right) to see how this card adapts in real-time.
Transparency
Mode Derivation
See exactly how your inputs become a coherent interface mode.
Derivation Rules
Cognitive controls density:
- cognitive < 0.4 → density: low
- cognitive > 0.7 → density: high
- else → density: medium
Temporal controls choices:
- temporal < 0.4 → choiceLoad: minimal
- else → choiceLoad: normal
Emotional controls motion:
- emotional < 0.15 → motion: off
- emotional < 0.4 → motion: soothing
- emotional > 0.6 & val > 0.15 → motion: expressive
- else → motion: subtle
Valence controls tone:
- valence < -0.15 → contrast: boosted
- else → contrast: standard
Cognitive controls focus:
- motion == off → focus: default
- cognitive < 0.4 → focus: guided
- cognitive < 0.7 → focus: gentle
- else → focus: default
Roadmap
Phase 1: Manual 4-input controls with mode derivation
Phase 2: Automatic signals (scroll velocity, time-on-page, interaction patterns) modulate inputs passively — plus pattern-based prediction from past sessions
Phase 3: Arousal dimension, multimodal feedback, proportional scaling systems
Roadmap
Development Phases
Manual Inputs
- 4-input capacity controls
- FieldManager with derived fields
- Mode derivation (4 modes)
- Active token system
- 4-tier motion system
- prefers-reduced-motion override
Automatic Signals
- SignalAggregator (6 detectors)
- Time, Session, Scroll detectors
- Interaction, Input, Environment
- Auto-mode with manual override
- PatternStore + PatternExtractor
- PredictionEngine + hook
Extended Dimensions
- Arousal dimension → pace token
- Haptic feedback (Vibration API)
- Sonic feedback (Web Audio API)
- Fibonacci spacing scale
- Golden ratio utilities
- guidance + choiceLoad consumed