Like Button, add a collider. Use OnCollisionEnter or OnTriggerEnter to start the dragging and then move the thumb button with the finger (along the axis of the slider) until OnCollisionExit or OnTriggerExit occurs.
Our V2 assets have a Slider widget that works well. some aspects of the widgets are unnecessarily complicated, but you might look at the code and prefab structure for ideas.