There's a version of the slider function that takes a custom thumb and track. Just dig into the code to look at the implementations. But slider itself does not expose a specific way to just change the shape. If you take a look at SliderDefaults object you'll see the default thumb and track implementations
The thumb is implemented as a spacer with a filled shape background, where the shape is:
val shape = SliderTokens.HandleShape.toShape()
As for the track, that's drawn manually with the use of a Canvas and a few calls to drawLine