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

# newCustomWidget()

- 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/types/layoutTypes.ts

Creates a new custom widget.

**Signature:**

```typescript
export declare function newCustomWidget<TExtra = void>(identifier: string, customType: string, extras?: TExtra & Partial<IFilterableWidget>): TExtra & ICustomWidget;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| identifier | string | identifier for custom widget; once added onto a dashboard, widget will be referencable using this identifier |
| customType | string | custom widget type |
| extras | TExtra &amp; Partial&lt;[IFilterableWidget](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ifilterablewidget/index.md)&gt; | _(Optional)_ provide extra data to include on the custom widget; the content of this argument can be an arbitrary plain object. note: the factory will make a copy of all the extra data. at this moment it is not possible to modify the data once the widget is added onto a dashboard. |

**Returns:**

TExtra &amp; [ICustomWidget](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.icustomwidget/index.md)
