[Jquerry/ Javascript] How to center an element on click (icon on a line of icons)

Hi! i want to recreate the effect on the section under the hero of this website. https://clickup.com/

where we have a strip of icons that move around so the clicked icon is on the centre of the screen and all the other icons move accordingly, any ideas? i have managed to replicate the rest of the interactions using jquery, but no idea how to achieve that one.


Here is my public share link: LINK
(how to access public share link)