Scaling Component APIs: Props, Slots, and When to Split
As features grow, components get more props, more branches, and more responsibility. Scaling component APIs means choosing the right abstraction: props for configuration, slots for structure and layout, and composables for shared logic—and knowing when to split one component into several. This post covers how to decide.
Props: configuration and data
Props are best for: configuration (variant, size, disabled), and data the component needs to render (title, items). Keep props focused: avoid "prop drilling" by passing only what the component (and its direct children) need. Use TypeScript and clear names so the API is self-explanatory.