Skip to content

help(Gestures): What is the recommended way to include gestures into Angular Material? #24936

@0xclx

Description

@0xclx

What are you trying to do?

I have been researching on how to enable general gestures and animations with Angular Material.
Back with AngularJS Material there were many Material-Like Controls with Animations like the Fab-Speed-Dial, and the Material-Spec and up until Angular 9 (I think) swipe-to-open Sidenavs were supported via gestures.

However this Gesture-Support was then dropped. Looking at HammerJS, which was previously used but then dropped, I am now wondering what the recommended/preferred way to include native-like/feeling controls (without using something like ionic/capacitor) would be.

Is there some recommendation for some library? Or is the general consensus "Build it yourself with Vanilla JS/Do not use gestures/animations"?

On Desktop gestures are not supported, sure, but for mobile devices, especially when packaged as a PWA, it would provide quite some "responsive" feeling and value if an Angular App worked just like a mobile app would.
(For example - Swipe Sidenav to Open/Close, Swipe Snackbar to close, ...)

What troubleshooting steps have you tried?

Reproduction

Environment

Angular CLI: 13.3.3
Node: 18.0.0 (Unsupported)
Package Manager: npm 8.6.0
OS: win32 x64

Angular:
...

Package Version

@angular-devkit/architect 0.1303.3 (cli-only)
@angular-devkit/core 13.3.3 (cli-only)
@angular-devkit/schematics 13.3.3 (cli-only)
@schematics/angular 13.3.3 (cli-only)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentandroidIssues specific to Androidarea: manyArea label for issues related to many componentsdocsThis issue is related to documentationiosIssues specific to iOStroubleshootingThis issue is not reporting an issue, but just asking for help

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions