svelte-tweakpane-ui icon indicating copy to clipboard operation
svelte-tweakpane-ui copied to clipboard

`AutoObject` tooltip support

Open janosh opened this issue 8 months ago • 1 comments

nice work on this package! 👍

is there a way to specify hover tooltips in AutoObject? i have several tweak panes (1, 2, 3) that i would like to migrate to AutoObject which already have tooltips that i'd like to keep:

Image

site: https://matterviz.janosh.dev (code)

janosh avatar Aug 01 '25 08:08 janosh

Hi, thanks Janosh — to my knowledge Tweakpane doesn't really have direct support for tooltips as it is, and the tricky thing about <AutoObject> is that there's not really a great place to stash additional metadata about a value (such as a tooltip) without adding complexity to both the <AutoObject> component and the value objects passed to it. (This is discussed at greater length in #3.)

For an example of dynamically constructing more complex UIs, I can recommend taking a look at Tweakpane CSS, particularly here where a UI is built up dynamically from a custom object representation.

Theoretically I / we could add a title / tooltip prop to all the components in Svelte Tweakpane UI, but I feel like a change this significant would make more sense upstream in the Tweakpane library proper.

Still, I'll leave this open as a feature request.

kitschpatrol avatar Aug 08 '25 14:08 kitschpatrol