본문으로 건너뛰기
zest/ui

컴포넌트

File Dropzone

파일 끌어 놓기·선택. 형식·크기 검증.

증빙 파일

파일을 여기로 끌어 놓거나

.pdf,.png,.jpg · 최대 10MB

설치

shadcn CLI 로 소스를 프로젝트에 가져와요. 테마·유틸·의존 부품이 함께 설치돼요.

npx shadcn@latest add @zest/file-dropzone

패키지로 쓰려면 @zest-im/ui 에서 가져와요. 설치 안내

사용법

import { FileDropzone } from '@/components/ui/file-dropzone'

위 미리보기의 「코드」 탭이 실제로 동작하는 예제예요.

API

prop타입설명
labelstring—
accept?stringinput accept 와 같은 형식(".pdf,.png", "image/*")
maxSize?number바이트
multiple?boolean—
files?File[]—
onFiles(files: File[]) => void—
onRemove?((index: number) => void)—
hint?string—
className?string—

표에 없는 HTML·Radix 속성은 그대로 전달돼요.

접근성

오류는 aria-live 로 알린다.