API Reference > ui-framework > Widget > WidgetManager > addWidgetDef addWidgetDef Method Adds a WidgetDef for use in a Frontstage. addWidgetDef(widgetDef: WidgetDef, stageId: undefined | string, stageUsage: undefined | string, location: ZoneLocation | StagePanelLocation, section?: StagePanelSection): boolean note Added widgetDef must return unique id to correctly save/restore App layout. Semi-stable id is generated when auto-generated widgetDef id is detected, but correctness of such id depends on addWidgetDef call order and widget location. Parameter Type Description widgetDef WidgetDef stageId undefined | string stageUsage undefined | string location ZoneLocation | StagePanelLocation section StagePanelSection Returns - boolean Defined in ui/framework/src/ui-framework/widgets/WidgetManager.ts Line 121 Last Updated: 12 June, 2024