Advanced Vue.js Component Design
summary
Shows how to turn a tag-input (press Enter to add, Backspace removes previous, de-duplicates, click X to delete) into a UI-less, behavior-first Vue component by using scoped slots to pass state and actions, bundling handlers as event handler groups (v-on object) and bindings (v-bind object), and using render functions to remove wrapper DOM. Demo uses Vue single-file components, slot-prop destructuring, and wrapper components to restore reusable UIs; the live demo runs, supports two different layouts/styles, and reproduces add/remove/keydown behavior.
AI-written summary · about
chapters (15)
- 0:00Introduction and setup
- 3:12Talk overview and demo app
- 7:49Customizing UI with style props
- 9:11CSS hooks and their limitations
- 13:24Scoped slots as solution
- 16:57Regular slots vs scoped slots
- 21:10Implementing scoped slots
- 24:47Slot prop categories
- 30:07Customizing input with slots
- 37:15Event handler groups
- 43:59Supporting alternate layouts
- 50:41Render functions for UI-less components
- 54:14Creating wrapper components
- 57:21Benefits of scoped slots
- 58:25Q&A and closing remarks
