DropZone
The props declared for DropZone, generated from the types @proyecto-viviana/ui ships.
Import
import { DropZone } from "@proyecto-viviana/ui";Props
| Prop | Type | Default | Description |
|---|---|---|---|
children* | JSX.Element | — | The content to display in the DropZone. |
isFilled | false | true | — | Whether the DropZone already contains a file. Shows the replace message while dragging. |
replaceMessage | string | 'Drop file to replace' | The message shown while dragging over a filled DropZone. |
size | 'S' | 'M' | 'L' | 'M' | The DropZone size. |
styles | StylesPropWithHeight | (() => StyleString | undefined) | — | Spectrum-defined styles, returned by the `style()` macro. |
UNSAFE_className | string | UnsafeClassName | — | Additional CSS class name. Use only as a last resort. |
UNSAFE_style | JSX.CSSProperties | — | Additional inline styles. Use only as a last resort. |
slot | string | — | Not yet documented |
ref | HTMLDivElement | ((el: HTMLDivElement) => void) | { current?: HTMLDivElement | null | undefined; } | — | Not yet documented |
onDrop | (e: DropEvent) => void | — | Handler that is called when a valid drag is dropped on the drop target. solidaria |
getDropOperation | (types: DragTypes, allowedOperations: DropOperation[]) => DropOperation | — | A function returning the drop operation to be performed. solidaria |
getDropOperationForPoint | (types: DragTypes, allowedOperations: DropOperation[], x: number, y: number) => DropOperation | — | A function returning the drop operation for a specific point. solidaria |
onDropEnter | (e: DropEnterEvent) => void | — | Handler that is called when a valid drag enters the drop target. solidaria |
onDropMove | (e: DropMoveEvent) => void | — | Handler that is called when a valid drag is moved within the drop target. solidaria |
onDropActivate | (e: DropActivateEvent) => void | — | Handler that is called after a valid drag is held over the drop target. solidaria |
onDropExit | (e: DropExitEvent) => void | — | Handler that is called when a valid drag exits the drop target. solidaria |
Declared in packages/viviana-ui/src/dropzone/index.tsx.
Props marked solidaria or solidaria-components come from the headless layer underneath and behave the same in both registers. Components that wrap a DOM element also accept that element's standard attributes, which are left out here on purpose — listing them would bury the props that are actually ours.