Command Palette

Search for a command to run...

GitHub Profile
Components

Haptic Feedback

모바일 기기에서 햅틱 피드백을 일으켜요.

Loading…

특징

  • Android에서는 Vibration API를, iOS에서는 체크박스 트릭을 사용해요.
  • Android 기기에서는 진동 시간과 패턴을 자유롭게 지정할 수 있어요.
  • Vercel 모바일 앱의 햅틱 경험에서 영감을 받았어요.

설치

처음이라면 components.json에 @smlee 레지스트리를 한 번만 등록하세요.

{
  "registries": {
    "@smlee": "https://smlee.info/r/{name}.json"
  }
}

그다음 컴포넌트를 추가해요.

pnpm dlx shadcn@latest add @smlee/haptic

사용법

import { haptic } from "@/lib/haptic"
<Button onClick={() => haptic()}>Haptic</Button>

API 레퍼런스

속성

타입

Command Palette

Search for a command to run...