What's new in v1.0.2 ?
This can be activated by means of the new, 4th input parameter.
DisableFadeoutEffect: Set to True if you want to remove the fade out effect when the button is swiped.
Please see documentation v1.0.1 for other details.
To use the widget in your app, add the block as a dependency into your module and drag the block to the screen where you want the "swipe to unlock" behavior. It can also be used in the layout of the app.
The block has 3 optional input parameters. You can change the following:
The block has 1 mandatory and 1 optional events to be handled:
We used this "refresh client action-to-object" approach so that we can reach the Refresh action of the widget from the consumer screen. This way we don't have to use a "Refresh" input parameter in the widget when we want it to be refreshed.
There are 2 placeholders for the slider and the button. This way, you can change the default text on the background of the slider, or add an icon on the button.
The widget is built only with minimal CSS code and pure JS. CSS variables are used as much as possible, so the widget adapts to your own app's look & feel.
Please check out the demo app for the use cases explained in this documentation.
Disclaimer: This component is meant to be used in mobile, so it uses JS touch events. Please use a mobile view of the browser to test the pattern. With a small conversion of touch events to mouse events, it can be adapted to work on "desktop" layouts.
Adapted from: https://codepen.io/Ruddy/pen/WNVNRv
Changes in v1.0.1: Small bugfix in the demo app