Skip to content
Components
@app-studio/components

DropZone

The `DropZone` component provides a drag-and-drop area for file uploads. It extends the functionality of the `Uploader` component but offers a specific UI optimized for dropping files. It supports single and multiple file selection, custom content, and image previews.

View component source

Import

ts
import { DropZone } from '@app-studio/components';

New to the library? Complete installation and provider setup first.

Interactive examples

Try the component, then open Code to copy the complete example.

INTERACTIVE EXAMPLE

Loading preview…

Props

Required props are marked below. A dash indicates an unspecified default. Design system configuration can override implementation defaults.

Scroll horizontally to see every column.

DropZone
PropTypeDefaultDescription
children
View typestring | number | bigint | boolean | import("/Volumes/workspace/open-source/app-studio-components/node_modules/@types/react/index").ReactElement<unknown, string | import("/Volumes/workspace/open-source/app-studio-components/node_modules/@types/react/index").JSXElementConstructor<any>> | Iterable<import("/Volumes/workspace/open-source/app-studio-components/node_modules/@types/react/index").ReactNode> | import("/Volumes/workspace/open-source/app-studio-components/node_modules/@types/react/index").ReactPortal | Promise<string | number | bigint | boolean | import("/Volumes/workspace/open-source/app-studio-components/node_modules/@types/react/index").ReactPortal | import("/Volumes/workspace/open-source/app-studio-components/node_modules/@types/react/index").ReactElement<unknown, string | import("/Volumes/workspace/open-source/app-studio-components/node_modules/@types/react/index").JSXElementConstructor<any>> | Iterable<import("/Volumes/workspace/open-source/app-studio-components/node_modules/@types/react/index").ReactNode> | null | undefined> | null
—Content rendered inside the component.Source
containerPropsViewProps—See the type and source declaration for this property.Source
textstring—See the type and source declaration for this property.Source
textPropsTextProps—See the type and source declaration for this property.Source
disabledboolean—Disables user interaction.Source
imagePropsImageProps—See the type and source declaration for this property.Source
previewUrlstring | null—See the type and source declaration for this property.Source
selectedFilesFile[]—See the type and source declaration for this property.Source
onRemove((index: number) => void)—See the type and source declaration for this property.Source
acceptstring—See the type and source declaration for this property.Source
maxSizenumber—See the type and source declaration for this property.Source
onFileSelect((file: File) => void)—See the type and source declaration for this property.Source
onMultipleFileSelect((files: File[]) => void)—See the type and source declaration for this property.Source
validateFile((file: File) => string | null)—See the type and source declaration for this property.Source
onError((error: string) => void)—See the type and source declaration for this property.Source
thumbnailstring—See the type and source declaration for this property.Source
multipleboolean—See the type and source declaration for this property.Source

For shared layout, color, and responsive properties, read Styling & composition and Responsive layouts. Additional native element attributes depend on the target platform.

Usage guidance

  • Give controls a visible label or an accessible name, and verify keyboard interaction. See Accessibility.
  • For controlled inputs, update the value from the callback shown in the props table. Keep application state in your component or form library.
  • These previews run in the browser. Check React Native setup for platform requirements and differences.
Browse documentation source