Open History to see the last commit
1---
2id: DevtoolsOptions
3title: DevtoolsOptions
4---
5β
6# Interface: DevtoolsOptions
7β
8Options for configuring the TanStack Query devtools.
9β
10## Properties
11β
12### buttonPosition?
13β
14```ts
15optional buttonPosition: DevtoolsButtonPosition;
16```
17β
18The position of the TanStack logo to open and close the devtools panel.
19`top-left` | `top-right` | `bottom-left` | `bottom-right` | `relative`
20Defaults to `bottom-right`.
21β
22#### Defined in
23β
24[providers.ts:192](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L192)
25β
26---
27β
28### client?
29β
30```ts
31optional client: QueryClient;
32```
33β
34Custom instance of QueryClient
35β
36#### Defined in
37β
38[providers.ts:202](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L202)
39β
40---
41β
42### errorTypes?
43β
44```ts
45optional errorTypes: DevtoolsErrorType[];
46```
47β
48Use this so you can define custom errors that can be shown in the devtools.
49β
50#### Defined in
51β
52[providers.ts:206](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L206)
53β
54---
55β
56### initialIsOpen?
57β
58```ts
59optional initialIsOpen: boolean;
60```
61β
62Set this true if you want the devtools to default to being open
63β
64#### Defined in
65β
66[providers.ts:186](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L186)
67β
68---
69β
70### loadDevtools?
71β
72```ts
73optional loadDevtools: boolean | "auto";
74```
75β
76Whether the developer tools should load.
77β
78- `auto`- (Default) Lazily loads devtools when in development mode. Skips loading in production mode.
79- `true`- Always load the devtools, regardless of the environment.
80- `false`- Never load the devtools, regardless of the environment.
81β
82You can use `true` and `false` to override loading developer tools from an environment file.
83For example, a test environment might run in production mode but you may want to load developer tools.
84β
85Additionally, you can use a signal in the callback to dynamically load the devtools based on a condition. For example,
86a signal created from a RxJS observable that listens for a keyboard shortcut.
87β
88**Example**
89β
90```ts
91withDevtools(() => ({
92 initialIsOpen: true,
93 loadDevtools: inject(ExampleService).loadDevtools(),
94}))
95```
96β
97#### Defined in
98β
99[providers.ts:236](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L236)
100β
101---
102β
103### position?
104β
105```ts
106optional position: DevtoolsPosition;
107```
108β
109The position of the TanStack Query devtools panel.
110`top` | `bottom` | `left` | `right`
111Defaults to `bottom`.
112β
113#### Defined in
114β
115[providers.ts:198](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L198)
116β
117---
118β
119### shadowDOMTarget?
120β
121```ts
122optional shadowDOMTarget: ShadowRoot;
123```
124β
125Use this so you can attach the devtool's styles to a specific element in the DOM.
126β
127#### Defined in
128β
129[providers.ts:214](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L214)
130β
131---
132β
133### styleNonce?
134β
135```ts
136optional styleNonce: string;
137```
138β
139Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.
140β
141#### Defined in
142β
143[providers.ts:210](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L210)