Open History to see the last commit
1---
2title: Plugin Configuration
3id: plugin-configuration
4---
6β
7# Plugin Configuration
8β
9You can configure TanStack Devtools plugins by passing them as an array to the `plugins` prop of the `TanStackDevtools` component.
10β
11Each plugin can have the following configuration options:
12- `name` (required) - A name to be displayed in the devtools UI.
13- `render` (required) - A React component that renders the plugin's UI.
14- `defaultOpen` (optional) - A boolean that determines if the plugin panel is open by default (default: false).
15- `id` (optional) - A unique identifier for the plugin. If not provided, a random id will be generated.
16β
17Here's an example of how to configure plugins in the `TanStackDevtools` component:
18β
19```tsx
20import { TanStackDevtools } from '@tanstack/react-devtools'
21import { FormDevtools } from '@tanstack/react-form-devtools'
22β
23function App() {
24 return (
25 <>
26 <YourApp />
27 <TanStackDevtools
28 plugins={[
29 {
30 name: 'TanStack Form',
31 render: <FormDevtools />,
32 defaultOpen: true,
33 },
34 ]}
35 />
36 </>
37 )
38}
39```
40β
41## Default open
42β
43You can set a plugin to be open by default by setting the `defaultOpen` property to `true` when configuring the plugin. This will make the plugin panel open when the devtools are first loaded.
44β
45If you only have 1 plugin it will automatically be opened regardless of the `defaultOpen` setting.
46β
47The limit to open plugins is at 3 panels at a time. If more than 3 plugins are set to `defaultOpen: true`, only the first 3 will be opened.
48β
49This does not override the settings saved in localStorage. If you have previously opened the plugin panel, and selected some plugins to be open or closed, those settings will take precedence over the `defaultOpen` setting.