Browse documentation

Reference / Interactivity

Touch action

Tell the browser which native panning and zooming gestures are available on a touch surface.

Working example

Manipulation allows panning and pinch zoom on this control. Restrict a gesture only on a surface that implements an alternative interaction.

HTML
<details class="touch-manipulation rounded border p-3">
  <summary>Paper dimensions</summary>
  <p class="mt-2">A5 · 148 × 210 mm</p>
</details>

Class reference

ClassCSS declarations
touch-autotouch-action: auto;
touch-pan-xtouch-action: pan-x;
touch-pan-ytouch-action: pan-y;
touch-pinch-zoomtouch-action: pinch-zoom;
touch-manipulationtouch-action: manipulation;
touch-nonetouch-action: none;
View full generated CSS
Compiled 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;
}