본문으로 건너뛰기
패턴 목록

복사 버튼

모션·인터랙션

코드 블록·API 키 옆에 붙이는 클립보드 복사 버튼. 보안 컨텍스트가 아니면 execCommand로 폴백하고, 결과를 aria-live로도 알린다.

미리보기

새 탭에서 열기
npx create-next-app@latest my-app --typescript --tailwind
sk_live_a1b2c3d4e5f6g7h8i9j0

navigator.clipboard는 보안 컨텍스트(https·localhost) 전용이라, 실패하면 execCommand로 폴백합니다. 결과는 aria-live로도 알립니다.

이 화면은 듀오랩스가 만들었습니다 · 홈페이지 · 웹서비스 개발