Reflex Swipe
Detects swipes on the page. Wraps react-swipeable.
from reflex_swipe import swipeable
def index():
return swipeable(
"Swipe Here",
on_swiped_left=rx.console_log("Swiped Left"),
height="100px",
width="100px",
)
Supported Props
| Prop Name | Prop Type | Description |
|---|---|---|
| delta | float | The min distance(px) before a swipe starts. |
| prevent_scroll_on_swipe | bool | Prevents scroll during swipe. |
| track_touch | bool | Track touch input. |
| track_mouse | bool | Track mouse input. |
| rotation_angle | float | Set a rotation angle. |
| swipe_duration | float | Allowable duration of a swipe (ms). |
Supported Events
| Event Name | Event Type |
|---|---|
| on_swiped | (SwipeEvent) -> Any |
| on_swiped_left | (SwipeEvent) -> Any |
| on_swiped_right | (SwipeEvent) -> Any |
| on_swiped_up | (SwipeEvent) -> Any |
| on_swiped_down | (SwipeEvent) -> Any |
| on_swiped_start | (SwipeEvent) -> Any |
| on_swiping | (SwipeEvent) -> Any |
| on_tap | () -> Any |
| on_touch_start_or_mouse_down | () -> Any |
| on_touch_end_or_mouse_up | () -> Any |
SwipeEvent is the following:
class SwipeEvent(TypedDict):
"""A swipe event."""
# direction of swipe
dir: Literal["Left", "Right", "Up", "Down"]
# initial swipe [x,y]
initial: Tuple[float, float]
# true for the first event of a tracked swipe
first: bool
# x offset (current.x - initial.x)
delta_x: float
# y offset (current.y - initial.y)
delta_y: float
# absolute delta_x
abs_x: float
# absolute delta_y
abs_y: float
# √(absX^2 + absY^2) / time - "absolute velocity" (speed)
velocity: float
# [ deltaX/time, deltaY/time] - velocity per axis
vxvy: Tuple[float, float]
Metadata
Release files for reflex-swipe 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| reflex_swipe-1.1.2.tar.gz | 56.3 kB | Without provenance | Details for reflex_swipe-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| reflex_swipe-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for reflex_swipe-1.1.2-py3-none-any.whl |
Total release size: 60.3 kB
Release files / reflex_swipe-1.1.2.tar.gz
| Download URL | reflex_swipe-1.1.2.tar.gz |
|---|---|
| Size | 56.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
802f140b7000bb98428684a2b7fb6afe623e12cef50a5f24adba83601cec84a9
|
|
BLAKE2b-256 checksum How to use checksums |
556ecba8b29e45dd53b62571be6bee3b4266dbb4953d08422a13d785096ffc2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.13
|
Release files / reflex_swipe-1.1.2-py3-none-any.whl
| Download URL | reflex_swipe-1.1.2-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cdec1eba4c0fb5956ccada1b022b23156809af82979cb42bd5155b535ece3364
|
|
BLAKE2b-256 checksum How to use checksums |
e386b8335f5e85daa1e0b3a99faec21ba338621c13ddcb3b50e4f3e731a2acd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.13
|
Security for reflex-swipe 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.