1. 인터랙티비티
  2. touch-action

인터랙티비티

touch-action

터치스크린에서 요소를 스크롤하고 확대/축소하는 방식을 제어하는 유틸리티입니다.

ClassStyles
touch-auto
touch-action: auto;
touch-none
touch-action: none;
touch-pan-x
touch-action: pan-x;
touch-pan-left
touch-action: pan-left;
touch-pan-right
touch-action: pan-right;
touch-pan-y
touch-action: pan-y;
touch-pan-up
touch-action: pan-up;
touch-pan-down
touch-action: pan-down;
touch-pinch-zoom
touch-action: pinch-zoom;
touch-manipulation
touch-action: manipulation;

예제

기본 예제

touch-pan-ytouch-pinch-zoom 같은 유틸리티를 사용해 터치스크린에서 엘리먼트를 스크롤(패닝)하고 확대/축소(핀치)하는 방식을 제어할 수 있습니다:

터치스크린에서 이 이미지를 패닝해 보세요

touch-auto

touch-none

touch-pan-x

touch-pan-y

<div class="h-48 w-full touch-auto overflow-auto ...">  <img class="h-auto w-[150%] max-w-none" src="..." /></div><div class="h-48 w-full touch-none overflow-auto ...">  <img class="h-auto w-[150%] max-w-none" src="..." /></div><div class="h-48 w-full touch-pan-x overflow-auto ...">  <img class="h-auto w-[150%] max-w-none" src="..." /></div><div class="h-48 w-full touch-pan-y overflow-auto ...">  <img class="h-auto w-[150%] max-w-none" src="..." /></div>

반응형 디자인

접두사 a touch-action 유틸리티 md:와 같은 브레이크포인트 변형과 함께 사용하면 medium 화면 크기 이상에서만 유틸리티가 적용됩니다:

<div class="touch-pan-x md:touch-auto ...">  <!-- ... --></div>

변형 사용에 대해 더 알아보려면 변형 문서를 참고하세요.

Copyright © 2025 Tailwind Labs Inc.·Trademark Policy