touch-action
Widely availableSince 201997% of users
Tells the browser how to handle touch interactions (like swiping or pinching) on a specific element. This is vital for complex mobile UIs, such as custom maps or sliders, where you want to disable default browser scrolling to handle it yourself.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since September 2019. Widely available since March 2022.
Newer parts of touch-action
pinch-zoomBaseline Jan 2021, Widely Jul 2023
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
auto- Inherited
- No
- Applies to
- all elements except non-replaced inline elements, table rows, columns, and row/column groups
- Animation type
- notAnimatable
Quick example
.map-canvas {
/* Disables the browser's default touch behaviors so the app can handle custom dragging/zooming */
touch-action: none;
}Values
autononepan-xpan-leftpan-rightpan-ypan-uppan-downpinch-zoommanipulationtouch-action browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2019.Safe to use without fallbacks.
Usage97%of people can use this3% use a browser without it.
Browsers
36+
52+
13+
12+Mobile
36+Android
52+Android
9.3+iOS