Chat Component
Prototype + Three Approaches to Component-Based Thinking
Pure HTML & CSS
A static mockup using only HTML and CSS to work out the interface design.
- ✅ No dependencies
- ✅ Always accessible
- ✅ Simple to understand
- ❌ No interactivity
DOM Manipulation
Interactive chat using vanilla JavaScript and standard DOM methods.
- ✅ Full interactivity
- ✅ Eliza-style bot
- ✅ Standard JavaScript
- ❌ No encapsulation
Progressive Enhancement
Custom element that enhances existing HTML markup with JavaScript.
- ✅ Graceful degradation
- ✅ Semantic base HTML
- ✅ Web Components API
- ✅ Global styles
Web Component
Fully encapsulated custom element with Shadow DOM and internal styles.
- ✅ Complete encapsulation
- ✅ Shadow DOM
- ✅ Self-contained
- ✅ Highly reusable