Skip to content

Conversation

@akshat-OwO
Copy link

🎯 Changes

Custom Trigger Component Support

  • Added an optional triggerComponent property to the devtools configuration, allowing users to specify a custom function or React element to render the devtools trigger. This replaces the default trigger button if provided. (packages/devtools/src/context/devtools-store.ts, packages/react-devtools/src/devtools.tsx)
  • Updated the trigger rendering logic in Trigger to check for a custom trigger component and render it via a container reference if present. (packages/devtools/src/components/trigger.tsx)

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

- changes in config to accept an optional custom trigger component
- replaces default trigger and allows for rendering a custom trigger
@changeset-bot
Copy link

changeset-bot bot commented Oct 22, 2025

🦋 Changeset detected

Latest commit: 9a81bba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@tanstack/react-devtools Minor
@tanstack/devtools Minor
@tanstack/solid-devtools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@maastrich
Copy link

Not blocking this pr but this partially answers to the problem of custom trigger, we cannot control where it will end up, I would have prefer something like a hook or an event emitter to open/close the devtools pannel so I can put it anywhere I want (in my case I want it not floating within a sidebar menu)

Both are not incompatible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants