Component API
A component API is the contract a component exposes to its consumers: props (what you pass in), slots or children (what you nest inside), events (what comes back), and any imperative handles. It's the interface through which the rest of the system uses the component, and getting it right matters more than getting the visuals right — visuals can be retokened, APIs cannot be changed without breaking every consumer.
Good component APIs are small, predictable, and hard to misuse. Prefer enumerated variants over arbitrary strings, compound components over deeply nested config props, and TypeScript types that make invalid combinations unrepresentable. Polaris and Material 3 both publish their API design principles publicly — useful comparators when you're settling internal conventions.
Related: Component · Variants · Compound components · Polymorphic components · Composability