ComponentsLayout and structure
Swipe area
A region that reports swipe gestures from touch, pen or mouse: the direction and the distance travelled. Use it for gesture shortcuts, and always offer a button for the same action.
Direction and distance
OnSwipeEnd reports the direction and the distance in pixels once a swipe is longer than Sensitivity. Drag across the area with a mouse, or swipe with a finger.
Swipe here
No swipe yet.
Following a swipe
OnSwipeMove reports both axes while the pointer moves, and OnSwipeLeave fires if it leaves the area. PreventDefault stops the page from scrolling under a vertical swipe on touch screens.
Drag in any direction
| Axis | Direction | Delta |
|---|---|---|
| Horizontal | None | 0 px |
| Vertical | None | 0 px |
Swiping through cards
A realistic use: swipe left or right to browse tonight's targets. The buttons do the same thing for keyboard and mouse users.
Target 1 of 4
Andromeda Galaxy
Naked-eye smudge in a dark sky; fills the eyepiece at low power.