Skip to content
Source
Sign inSign up
TanStack/query

react-query-devtools is missing style props from v4 #7777

Send to my agent
Closedkirankunigiri(GitHub profile, opens in a new tab) opened this issue 2 comments

Describe the bug

The react-query-devtools package is missing the styling props for customizing the devtools buttons and panels. I noticed these options were avaialble in v4 of react-query and also in the current version of tanstack/react-router. These props were extremely useful to integrate them into existing devtools UI for any app. Specifically, I'm referring to the panelProps, closeButtonProps, and toggleButtonProps on the ReactQueryDevtools component.

Is there a reason this was removed, and can adding them back be considered? It seems like it was meant to be a part of the Tanstack ecosystem since the router library had the exact same styling options as v4 did, but I'm not sure why it was removed for v5.

Your minimal, reproducible example

N/A

Steps to reproduce

Unable to customize styling for react-query-devtools buttons or panels.

Expected behavior

Should be able to customize styling for react-query-devtools using panelProps, closeButtonProps, and toggleButtonProps on the ReactQueryDevtools component.

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

All

Tanstack Query adapter

None

TanStack Query version

5.51.9

TypeScript version

No response

Additional context

No response

  1. Hello! Yeah the new devtools panel doesn't support passing inline styles. The reason for this being that different frameworks have different semantics for defining inline styles. For example fontSize in react as compared to font-size in solid-js. We however now prefix most of our DOM elements with classes prefixed with tsqd-*. You can target them with css and add your custom styles to each individual DOM element.

  2. TkDodo closed this

  3. TkDodo added labelswontfix

  4. TkDodo added labelshas workaround

  5. Hello! Yeah the new devtools panel doesn't support passing inline styles. The reason for this being that different frameworks have different semantics for defining inline styles. For example fontSize in react as compared to font-size in solid-js. We however now prefix most of our DOM elements with classes prefixed with tsqd-*. You can target them with css and add your custom styles to each individual DOM element.

    [class^='tsqd'] {
      font-size: 16px;
    }

    That's how I did it, if anyone comes across this thread again :)

Sign in to join this conversation.