Browse documentation
Reference / Interactivity
Touch action
Tell the browser which native panning and zooming gestures are available on a touch surface.
Working example
Paper dimensions
A5 · 148 × 210 mm
Manipulation allows panning and pinch zoom on this control. Restrict a gesture only on a surface that implements an alternative interaction.
<details class="touch-manipulation rounded border p-3">
<summary>Paper dimensions</summary>
<p class="mt-2">A5 · 148 × 210 mm</p>
</details>Class reference
| Class | CSS declarations |
|---|---|
touch-auto | touch-action: auto; |
touch-pan-x | touch-action: pan-x; |
touch-pan-y | touch-action: pan-y; |
touch-pinch-zoom | touch-action: pinch-zoom; |
touch-manipulation | touch-action: manipulation; |
touch-none | touch-action: none; |
View full generated CSS
.touch-auto {
touch-action: auto;
}
.touch-manipulation {
touch-action: manipulation;
}
.touch-none {
touch-action: none;
}
.touch-pan-x {
touch-action: pan-x;
}
.touch-pan-y {
touch-action: pan-y;
}
.touch-pinch-zoom {
touch-action: pinch-zoom;
}