A sensor assembly for measuring a linear position includes a slider having a rack gear that engages a pinion gear. The pinion gear is rotatable relative to the slider responsive to linear movement. The pinion gear supports a permanent magnet that generates a magnetic field. Changes in the magnetic field caused by rotation of the pinion gear are sensed by a magnetic field sensor. Signals from the magnetic field sensor are indicative of a rotation of pinion gear and correspond to linear movement of the slider.