Skip to content

Switching images in Image.PreviewGroup by swipes #430

@FluorescentHallucinogen

Description

What problem does this feature solve?

Currently, Image.PreviewGroup supports keyboard arrow keys to navigate between images in the preview modal, which is great for desktop users.

However, on mobile devices, it would be very helpful to support horizontal swipe gestures (left/right) in the preview modal to move to previous/next image.

This will provide provide a more intuitive experience for users of touchscreen devices.

What does the proposed API look like?

No changes to the public API are strictly required.

The swipe gesture support could be implemented internally and enabled by default.

If needed, a prop like enableSwipes?: boolean could be introduced to optionally enable/disable swipe navigation.

Notes

See also ant-design/ant-design#54158.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions