# useUiConfig | @account-kit/react

> A custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useUiConfig.tsx) for accessing UI configuration from the `UiConfigContext`. Allows optional selection of specific parts of the UI config state using a selector function. For editing and updating the underlying UI config on the fly.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function useUiConfig<T>(selector?): T;
```

Defined in: [account-kit/react/src/hooks/useUiConfig.tsx:63](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useUiConfig.tsx#L63)

## Type Parameters

<table>
  <thead>
    <tr>
      <th align="left">Type Parameter</th>
      <th align="left">Default type</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `T`
      </td>

      <td>
        [`UiConfigStore`](../type-aliases/UiConfigStore)
      </td>
    </tr>

  </tbody>
</table>

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `selector?`
      </td>

      <td>
        (`state`) => `T`
      </td>

      <td>
        An optional function to select specific parts of the UI config state. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useUiConfig.tsx#L23)
      </td>
    </tr>

  </tbody>
</table>

## Returns

`T`

- The selected state passed through the selector function or the entire state if no selector is provided