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

# newWidthForAttributeColumn()

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

Creates width item that will set width of a column which contains values of a row attribute.

**Signature:**

```typescript
export declare function newWidthForAttributeColumn(attributeOrId: IAttribute | string, width: number, allowGrowToFit?: boolean): IAttributeColumnWidthItem;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| attributeOrId | [IAttribute](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iattribute/index.md) \| string | Attribute specified by value or by localId reference |
| width | number | Width in pixels |
| allowGrowToFit | boolean | _(Optional)_ indicates whether the column is allowed to grow if the table's growToFit is enabled |

**Returns:**

[IAttributeColumnWidthItem](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-pivot/sdk-ui-pivot.iattributecolumnwidthitem/index.md)
