Moving cursor between images via click and touch

I’m looking for some advice. I have a document that is composed solely of images. On mobile and desktop the user should be able to move the cursor between the images, in addition to selecting one or more images. The images are too close together. Touching inbetween isn’t feasible.

One idea I tried was to add margins on the images, this increases the space between elements, but doesn’t result in smaller hitboxes.

I’m wondering if I should add a touch handler to each image that measures the touch position and moves the cursor to the side closest to the touch. What would you all advise?

1 Like

Something like that would work. Though I’m not sure why the margins are being included in the hit boxes—margins are supposed to end up outside an element’s box. Is there some kind of wrapper element around the images?

The images are not wrapped. I will take a stab using touch handling.