composition

Building a component out of smaller components that the consumer assembles, instead of configuring one big component with flags.

In more detail

A composable Card exposes Card, CardTitle and CardBody, and the consumer arranges them. New layouts need no new props, and unused parts are not rendered. Composition hands control of structure back to the consumer.

Related terms

Taught in

References