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

# IPlaceholder

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

Placeholder represents a reference to a specific part of the execution - attribute(s), measure(s), filter(s), sort(s) or total(s), that may change the value at runtime.

**Signature:**

```typescript
export type IPlaceholder<T> = {
    type: "IPlaceholder";
    id: string;
    defaultValue?: T;
    value?: T;
    validate?: (value: T) => void;
    use: IUsePlaceholderHook<IPlaceholder<T>>;
};
```
**References:** [IUsePlaceholderHook](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iuseplaceholderhook/index.md), [IPlaceholder](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iplaceholder/index.md)

## Remarks

You can provide it to visualizations instead of the attributes/measures/filters/sorts/totals themselves, placeholders will be replaced with the actual values on the background.

This allows you: - share a reference to the same execution elements across multiple components. - change the value of these execution elements with ease. - decouple hardcoded execution elements from the visualizations. - update any number of visualizations just by updating the placeholder value.

Placeholder values are living in React context and you can obtain/set their values by the following hooks: - [usePlaceholder()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.useplaceholder/index.md)

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

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

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

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

Note: - Don't create placeholders manually, to create a new placeholder, use factory function [newPlaceholder()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.newplaceholder/index.md). - To make it work, don't forget to wrap your application in [PlaceholdersProvider()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.placeholdersprovider/index.md).
