컴포넌트
Tooltip
짧은 설명. 키보드 포커스로도 뜬다.
import { Download } from 'lucide-react'
import { IconButton } from '@zest/primitives/IconButton.js'
import { Tooltip } from '@zest/primitives/Tooltip.js'
export default function Demo() {
return <Tooltip content="엑셀로 내려받기"><IconButton aria-label="다운로드" variant="outline"><Download /></IconButton></Tooltip>
}설치
shadcn CLI 로 소스를 프로젝트에 가져와요. 테마·유틸·의존 부품이 함께 설치돼요.
npx shadcn@latest add @zest/tooltip패키지로 쓰려면 @zest-im/ui 에서 가져와요. 설치 안내
사용법
import { Tooltip } from '@/components/ui/tooltip'위 미리보기의 「코드」 탭이 실제로 동작하는 예제예요.
API
| prop | 타입 | 설명 |
|---|---|---|
content | ReactNode | — |
side? | "right" | "left" | "top" | "bottom" | — |
children | ReactElement<unknown, string | JSXElementConstructor<any>> | — |
표에 없는 HTML·Radix 속성은 그대로 전달돼요.