Native only
Camera
camera + library · falls back to a seeded Placeholder
function PhotoCaptureDemo() { const [uri, setUri] = React.useState<string | null>(null); return ( <View className="w-full gap-3"> <View className="flex-row gap-3"> <View className="flex-1"> <PhotoCapture value={uri} onChange={setUri} label="Add a photo" seed="demo-photo" /> </View> <View className="w-28"> <PhotoCapture shape="avatar" label="Avatar" seed="demo-avatar" /> </View> </View> <ModeNote /> </View> );}Usage
Tap to take or choose a photo. Falls back to generated art wherever there is no camera — the web preview, the simulator, a declined permission — so the screen still reads as filled.
API
<PhotoCapture value? onChange? sources? shape="tile|avatar|wide" label? seed? simulate? />Get it
Already in every copy of the native kit:
import { PhotoCapture } from '@/components/kit/photo-capture';Details
- Exports
PhotoCapture- Packages
- expo-image-picker@~57.0.19, lucide-react-native@^1.21.0
- Installs with
- @halftone-native/icon, @halftone-native/lib-haptics, @halftone-native/lib-native-context, @halftone-native/lib-utils, @halftone-native/placeholder, @halftone-native/sheet, @halftone-native/text, @halftone-native/toast
- Also searched as
- camera, photo, image picker, upload, avatar photo, attachment
- Registry JSON
- /r/native/photo-capture.json
Agents: the whole registry is at /llms.txt.