Custom Svelte material UI Slider label

Viewed 157
1 Answers

It is unfortunately not possible to change the tooltip text with https://sveltematerialui.com/demo/slider/ .

The tooltip text is bound to value. See here: https://github.com/hperrin/svelte-material-ui/blob/master/packages/slider/src/Slider.svelte#L181

<span class="mdc-slider__value-indicator-text">{value}</span>

The value is exported by the component and you could modify it, but this would of course only allow for numbers and would also change the current value/position of the slider -> which would mess up it's functionality.

Related