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

# ThemeProvider()

- Package: [@gooddata/sdk-ui-theme-provider](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-theme-provider/index.md)
- Kind: function
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-theme-provider/src/ThemeProvider/ThemeProvider.tsx
- Guides: [Apply theming](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/embedding/apply-theming/index.md)

Fetches the theme object from the backend upon mounting and passes both theme object and isThemeLoading flag to the context via ThemeContextProvider.

**Signature:**

```typescript
export declare function ThemeProvider(input: IThemeProviderProps): import("react/jsx-runtime").JSX.Element;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| { children, theme: themeParam, backend: backendParam, workspace: workspaceParam, modifier, enableComplementaryPalette, removeGlobalStylesOnUnmout, } | (not declared) |  |
| input | [IThemeProviderProps](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-theme-provider/sdk-ui-theme-provider.ithemeproviderprops/index.md) |  |

**Returns:**

import("react/jsx-runtime").JSX.Element

## Remarks

Converts properties from theme object into CSS variables and injects them into <body> via setCssProperties

Both backend and workspace can be passed as an arguments, otherwise the component tries to get these from the context
