How can I get this behavior out of juce::Slider?

I think this might be what you’re looking for.