It’s less often that we see existing components gutted and repurposed, but when it happens, like with this reimagined rotary encoder ... and an AS5048A sensor board. The magnetic angle sensor ...
A low-friction slider with a slot captures the bar; moving the slider along the length of the control rotates the bar, which rotates the magnet, which allows the Hall sensor to measure the angle ...