
Security News
High Salaries No Longer Enough to Attract Top Cybersecurity Talent
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
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",
)
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). |
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]
FAQs
Provides swipe gestures detections for reflex apps.
We found that reflex-swipe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.