> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# getWidgetTitle()

- Package: [@gooddata/sdk-ui-dashboard](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/index.md)
- Kind: function
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-dashboard/src/model/utils/dashboardItemUtils.ts

Safely gets the title from an ExtendedDashboardWidget.

**Signature:**

```typescript
export declare function getWidgetTitle(widget?: ExtendedDashboardWidget, fallbackTitle?: string): string;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| widget | [ExtendedDashboardWidget](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.extendeddashboardwidget/index.md) | _(Optional)_ The widget to get title from |
| fallbackTitle | string | _(Optional)_ Title to return if widget doesn't have a title property |

**Returns:**

string

The widget title if available, otherwise the fallback title
