Open History to see the last commit
1---
2id: TanStackDevtoolsPlugin
3title: TanStackDevtoolsPlugin
4---
5β
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7β
8# Interface: TanStackDevtoolsPlugin
9β
10Defined in: [devtools/src/context/devtools-context.tsx:15](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L15)
11β
12## Properties
13β
14### defaultOpen?
15β
16```ts
17optional defaultOpen: boolean;
18```
19β
20Defined in: [devtools/src/context/devtools-context.tsx:58](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L58)
21β
22Whether the plugin should be open by default when there are no active plugins.
23If true, this plugin will be added to activePlugins on initial load when activePlugins is empty.
24β
25#### Default
26β
27```ts
28false
29```
30β
31***
32β
33### destroy()?
34β
35```ts
36optional destroy: (pluginId) => void;
37```
38β
39Defined in: [devtools/src/context/devtools-context.tsx:77](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L77)
40β
41#### Parameters
42β
43##### pluginId
44β
45`string`
46β
47#### Returns
48β
49`void`
50β
51***
52β
53### id?
54β
55```ts
56optional id: string;
57```
58β
59Defined in: [devtools/src/context/devtools-context.tsx:52](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L52)
60β
61Unique identifier for the plugin.
62If not provided, it will be generated based on the name.
63β
64***
65β
66### name
67β
68```ts
69name: string | (el, theme) => void;
70```
71β
72Defined in: [devtools/src/context/devtools-context.tsx:42](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L42)
73β
74Name to be displayed in the devtools UI.
75If a string, it will be used as the plugin name.
76If a function, it will be called with the mount element.
77β
78Example:
79```ts
80 {
81 // If a string, it will be used as the plugin name
82 name: "Your Plugin",
83 render: () => {}
84 }
85```
86or
87β
88```ts
89 {
90 // If a function, it will be called with the mount element
91 name: (el) => {
92 el.innerText = "Your Plugin Name"
93 // Your name logic here
94 },
95 render: () => {}
96 }
97```
98β
99***
100β
101### render()
102β
103```ts
104render: (el, theme) => void;
105```
106β
107Defined in: [devtools/src/context/devtools-context.tsx:72](https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L72)
108β
109Render the plugin UI by using the provided element. This function will be called
110when the plugin tab is clicked and expected to be mounted.
111β
112#### Parameters
113β
114##### el
115β
116`HTMLDivElement`
117β
118The mount element for the plugin.
119β
120##### theme
121β
122`"light"` | `"dark"`
123β
124#### Returns
125β
126`void`
127β
128void
129β
130Example:
131```ts
132 render: (el) => {
133 el.innerHTML = "<h1>Your Plugin</h1>"
134 }
135```