Touch Support
kaykay fully supports touch devices including tablets and phones.
Touch Gestures
- Single finger drag (canvas) - Pan the viewport
- Single finger drag (node) - Move nodes
- Pinch - Zoom in/out
- Tap handle - Start connection
- Tap node - Select node
- Tap canvas - Deselect all
Creating Connections
On touch devices, connections work slightly differently:
- Tap an output handle to start a connection
- Tap an input handle to complete it
- Tap the canvas to cancel
Minimap Touch
The minimap also supports touch:
- Tap - Jump to location
- Drag - Pan the viewport
Implementation
Touch support is built-in and automatic. The canvas uses:
/* Prevents browser gestures */
.canvas {
touch-action: none;
}
/* Touch events handled */
- touchstart
- touchmove
- touchend
- touchcancelBest Practices
- Make handles at least 44x44px for easy tapping
- Provide enough spacing between nodes
- Consider larger fonts for mobile
- Test on actual devices
Try it: If you're on a touch device, try dragging nodes and creating connections with touch!
Drag Me
Connect Me
Node A
Node B