Zephora UI

Form

FileUpload

File picker with a drag-and-drop zone, keyboard activation, per-file size validation and a removable file list.

Import

import { FileUpload } from "@zephora/react";

Examples

Basic

Click, press Enter, or drop a file onto the zone.

Drop files here or click to browse

Multiple images with size limit

Files above `maxSize` stay in the list but are flagged with an error and excluded from `onFilesChange`.

Drop images here (max 1 MB each)

Accepted: none

Disabled

Uploads are disabled

API

FileUpload props

PropTypeDefaultDescription
acceptstringAccepted file types, forwarded to the hidden input (e.g. "image/*").
multiplebooleanfalseAllows picking several files; new files are appended.
maxSizenumberMaximum file size in bytes; larger files are flagged with an error.
onFilesChange(files: File[]) => voidCalled with the accepted (non-errored) files after every change.
disabledbooleanfalseDisables the dropzone.
childrenReactNodeCustom trigger content rendered inside the dropzone.
aria-labelstring"Upload files"Accessible name for the dropzone.
unstyledbooleanfalseHeadless mode — drops Zephora classes so your own CSS can style it.
…restHTMLAttributes<HTMLDivElement>Forwarded to the root wrapper element.

Keyboard

KeyAction
Enter / SpaceOpens the file picker from the focused dropzone.
TabMoves focus between the dropzone and the remove buttons.