kitschpatrol / svelte-tweakpane-ui

A Svelte component library wrapping UI elements from Tweakpane, plus some additional functionality for convenience and flexibility.
https:///kitschpatrol.com/svelte-tweakpane-ui
MIT License
115 stars 3 forks source link

How do I hide the value field on a slider #8

Closed cristianvogel closed 4 months ago

cristianvogel commented 4 months ago

Excellent UI library and documentation, thankyou so much !

I just can't seem to do this simple thing, and that is to hide the value readout box next to a slider if necessary. Aplogies up front if I missed it and its really obvious.

kitschpatrol commented 4 months ago

Hey Cristian, thanks for using the library!

Good question, to my knowledge there's not an "official" way to do this through the Tweakpane API, so I haven't exposed a prop for this.

But it looks like something that can be accomplished with CSS, so I'll look into that approach and see if I can add a prop for it to the <Slider> component.

I should have a minute to mess with this in the next few days.

kitschpatrol commented 4 months ago

Ok, I added a wide prop to <Slider> and <SliderInterval> which hides the numeric input field when set to true.

It's named for consistency with a similar option included in the CameraKit plugin controls from the original Tweakpane author.

This is included in release v1.3.0.

Also added a demo to the documentation site.

Thanks for suggesting this!