# Controlled Mode

By default, the PanelBar is in an uncontrolled state.

To manage the state of the PanelBar:

* Set the [`isControlled`](https://www.telerik.com/kendo-react-ui/components/layout/api/panelbarprops#isControlled) property to `true` in order to enter the controlled mode first.
* Set the [`expanded`](https://www.telerik.com/kendo-react-ui/components/layout/api/panelbarprops#expanded) property to the expanded items value.
* Handle the [`onSelect`](https://www.telerik.com/kendo-react-ui/components/layout/api/panelbarprops#onSelect) event.
* Set the new value trough the props.

[Demo Source](https://demos.telerik.com/kendo-react-ui/layout/panelbar/controlled-state/basic/func/source.txt)

# Control All PanelBarItems And Use Unique Item Id

The following example demonstrates how to collapse and expand all PanelBar items while controlling the state and implementing own unique ids for each PanelBar item.

[Demo Source](https://demos.telerik.com/kendo-react-ui/layout/panelbar/controlled-state/all/func/source.txt)

## Suggested Links

* [API Reference of the PanelBar](https://www.telerik.com/kendo-react-ui/components/layout/api/panelbarprops)
* [API Reference of the PanelBarItem](https://www.telerik.com/kendo-react-ui/components/layout/api/panelbaritemprops)
