controlled component
A component whose state, such as whether it is open or checked, is passed in by its parent, which also handles changes.
In more detail
The parent supplies a value like open and a callback like onOpenChange, and the component just displays what it is told. This suits workflows where other parts of the page must know or set the state.
Related terms
- uncontrolled component — A component that keeps its own state internally, optionally starting from a default such as defaultOpen or defaultChecked.
- controllable state hook — A hook that lets one component work both controlled and uncontrolled, using the parent's value when given and its own state otherwise.
- prop — An input passed to a React component, written like an HTML attribute, such as size="lg" in <Button size="lg">.
Taught in
- Headless Architecture: State vs Presentation Separation — Design Systems & Component Engineering