FilePicker
FilePicker
Unified file picker experience bridging native DocumentPicker and web uploads.
Usage
Attach documents, media, or arbitrary files inside forms.
Highlights
- Abstracts platform differences
- Optional validation hooks before upload
When to use it
- You must request attachments without writing per-platform code.
- Preview + metadata extraction happen client-side.
Examples
Default
Preview (Web)
import { FilePicker } from 'react-native-molecules/components/FilePicker'; export default function Example() { return <FilePicker type={['image/*']} label="Choose image" multiple={false} />; }
Outlined
Preview (Web)
import { FilePicker } from 'react-native-molecules/components/FilePicker'; export default function Example() { return <FilePicker type={['image/*']} label="Choose image" multiple={false} variant="outlined" />; }
| Prop | Type | Default | Description |
|---|---|---|---|
onChange | (((e: TextInputChangeEvent) => void) & ((result: DocumentResult | DocumentResult[]) => any)) | undefined | — | — |
multiple | boolean | undefined | — | — |
loading | boolean | undefined | — | — |
left | ReactNode | — | — |
right | ReactNode | — | — |
value | DocumentResult | DocumentResult[] | undefined | — | — |
progressIndicator | ReactNode | — | — |