MindeesUI
ComponentsForms

ImagePicker

A button that opens the system photo library and returns typed image metadata, gated on expo-image-picker.

ImagePicker is a Button that launches the OS image library and reports the chosen images through onPick as a typed PickedImage[] (empty when cancelled). It is a gated peer: without expo-image-picker installed it renders a MissingPeer fallback showing the install command instead of throwing.

Import

import { ImagePicker } from '@mindees/ui';

Usage

<ImagePicker onPick={(images) => setImages(images)} allowsMultipleSelection quality={0.8}>
  Add photos
</ImagePicker>

Props

PropTypeDefaultDescription
onPick(images: readonly PickedImage[]) => voidFired with the picked images; empty array on cancel.
allowsMultipleSelectionbooleanfalseAllow selecting more than one image.
qualitynumberJPEG/PNG compression quality, 0–1.
allowsEditingbooleanShow the in-picker crop/edit UI before returning.
childrenReactNode'Choose image'Trigger label.

Also accepts ButtonBaseProps minus onPress and children, so variant, size, and tone apply to the trigger.

Accessibility

When the peer is present, the trigger is a standard Button and inherits its accessibility. When expo-image-picker is missing, a MissingPeer block explains the requirement and the pnpm add expo-image-picker install command.

On this page