Can anyone explain how a controller trigger works?

I was looking at my old XBOX controllers and tried to analyze how the triggers worked. They aren’t wired to the motherboard apart from the rumble packs. Does anyone have an explanation on how the triggers work because to me it looks like a plastic piece connected to nothing?

been a while since I opened up an Xbox controller, but pretty sure they’re using hall effect sensors, so a magnet likely in the trigger and a hall sensor on the board, the sensor produces positional data which is used for X and//or Y coordinates much like a mechanical potentiometer but with the added benefit that hall sensors don’t wear out like the mechanical counterparts

Not sure if they’e doing the same thing in their analogue sticks or not

Sega back in the day did the same thing on the Dreamcast controllers and I think the Sega Saturn 3D controller… I was under the impression they held the patent on this… but maybe Microsoft bought or licensed it

Thanks for the explanation. This makes sense right off the jump