There is a component which I've seen most often in car seat headrests which acts as a ratchet. You can pull the headrest forward and it will lock at steps until you pull it too far, and it will reset all the way back.
It's sort of a ratchet mechanism which resets after a certain range of motion.
I don't know what it's called. I've tried "resetting ratchet", "resetting step lock", and many other queries.
Do you know the name of this component?
I tried asking in DIY and they sent me here (https://diy.stackexchange.com/questions/214833/what-is-the-name-of-the-resetting-ratchet-component-found-most-often-in-head-res)