FileInput

FileInput은 파일을 선택해 업로드하고 수정할 수 있는 컴포넌트입니다.
TypescriptWAI-ARIA
Anatomy

파일 인풋을 구성하는 요소를 설명합니다.

AnatomyImage
Import
import { FileInput } from '@goorm-dev/vapor-components';
Examples
Props
namedescriptiondefault
fileMaprequired

{ extension?: string; name: string; src?: string; file?: File; size?: number; }; 형태의 object를 가진 배열입니다.

array
addFilerequired

파일 추가 시 실행되는 함수입니다.

func
deleteFilerequired

파일 삭제 버튼 클릭시 실행되는 함수입니다.

func
size

input의 크기를 결정합니다.

smmdlg
lg
badgeMaxWidth

파일 뱃지의 maxWidth를 결정합니다.

number
innerRef

Input의 ref입니다.

func{ current : any }
inputClassName

textInput의 className입니다.

string
className

가장 바깥의 className입니다.

string
isMultiple

true일 때 input 아래에 파일 뱃지들을 보여줍니다.

bool
placeholder

input의 placeholder를 결정합니다.

string
파일을 선택해주세요.
buttonText

파일 선택 버튼에 보일 글자입니다.

string
captionText

input의 설명입니다.

string
accept

업로드할 수 있는 파일의 타입을 명시합니다.

string
*
locale

kojaen
ko
isError

에러 UI 여부를 결정할 수 있습니다.

bool
false