Media
CameraView
A full-screen or inline camera preview with configurable facing, aspect ratio, and flash mode.
| Prop | Type | Default | Description |
|---|---|---|---|
facing? | 'front' | 'back' | 'back' | Which camera to use |
aspectRatio? | number | 4/3 | Container aspect ratio |
flash? | 'on' | 'off' | 'auto' | 'off' | Flash / torch mode |
onCapture? | (uri: string) => void | — | Called with the captured image URI |
accessibilityLabel? | string | 'Camera' | Accessibility label |
testID? | string | — | Test identifier |
import { CameraView } from '@objectifthunes/limestone-sdk';
<CameraView
facing="back"
aspectRatio={4 / 3}
onCapture={(uri) => console.log('Captured:', uri)}
/>
ImagePicker
A button or thumbnail that opens the system image picker. Supports single and multiple selection.
| Prop | Type | Default | Description |
|---|---|---|---|
variant? | 'button' | 'thumbnail' | 'button' | Visual presentation |
multiple? | boolean | false | Allow selecting multiple images |
quality? | number | 0.8 | JPEG compression quality (0–1) |
onSelect? | (assets: MediaAsset[]) => void | — | Called with selected assets |
accessibilityLabel? | string | — | Accessibility label |
testID? | string | — | Test identifier |
import { ImagePicker } from '@objectifthunes/limestone-sdk';
<ImagePicker
multiple
quality={0.9}
onSelect={(assets) => setImages(assets)}
/>
VideoPlayer
An inline video player with optional native controls, autoplay, loop, and mute support.
| Prop | Type | Default | Description |
|---|---|---|---|
source | VideoSource | — | { uri: string } or { asset: number } |
autoPlay? | boolean | false | Start playing on mount |
loop? | boolean | false | Loop playback |
muted? | boolean | false | Mute audio |
showControls? | boolean | true | Show native playback controls |
aspectRatio? | number | 16/9 | Container aspect ratio |
onEnd? | () => void | — | Called when playback completes |
accessibilityLabel? | string | — | Accessibility label |
testID? | string | — | Test identifier |
import { VideoPlayer } from '@objectifthunes/limestone-sdk';
<VideoPlayer
source={{ uri: 'https://example.com/video.mp4' }}
autoPlay
loop
aspectRatio={16 / 9}
/>
Carousel
A horizontally scrolling carousel with optional auto-play, dots, and arrow navigation.
| Prop | Type | Default | Description |
|---|---|---|---|
items | CarouselItem[] | — | Each item: { key, content } |
autoPlay? | boolean | false | Advance slides automatically |
autoPlayInterval? | number | 3000 | Milliseconds between slides |
loop? | boolean | false | Wrap around after the last slide |
showDots? | boolean | true | Show page indicator dots |
showArrows? | boolean | false | Show previous/next arrow buttons |
gap? | SpacingProp | — | Gap between slides |
snapAlignment? | 'start' | 'center' | 'end' | 'start' | Snap position |
accessibilityLabel? | string | — | Accessibility label |
testID? | string | — | Test identifier |
import { Carousel } from '@objectifthunes/limestone-sdk';
const slides = [
{ key: 'a', content: <Image src="..." alt="Slide 1" /> },
{ key: 'b', content: <Image src="..." alt="Slide 2" /> },
];
<Carousel items={slides} autoPlay loop showDots />
QRScanner
A full-screen QR/barcode scanner that calls onScan with the decoded value.
| Prop | Type | Default | Description |
|---|---|---|---|
onScan? | (value: string) => void | — | Called with the scanned string |
onError? | (error: Error) => void | — | Called on scanner error |
torchEnabled? | boolean | false | Enable the device torch |
vibrate? | boolean | true | Vibrate on successful scan |
aspectRatio? | number | 1 | Container aspect ratio |
accessibilityLabel? | string | 'QR Scanner' | Accessibility label |
testID? | string | — | Test identifier |
import { QRScanner } from '@objectifthunes/limestone-sdk';
<QRScanner
onScan={(value) => handleQR(value)}
torchEnabled={flashEnabled}
/>
AudioPlayer
An audio playback widget with compact or full-player layout.
| Prop | Type | Default | Description |
|---|---|---|---|
source | string | — | Audio file URI |
variant? | 'compact' | 'full' | 'compact' | Visual layout |
autoPlay? | boolean | false | Start playing on mount |
loop? | boolean | false | Loop playback |
onComplete? | () => void | — | Called when playback ends |
accessibilityLabel? | string | — | Accessibility label |
testID? | string | — | Test identifier |
import { AudioPlayer } from '@objectifthunes/limestone-sdk';
<AudioPlayer
source="https://example.com/audio.mp3"
variant="full"
onComplete={() => markListened()}
/>
MapView
An inline map with markers, user location, and optional pan/zoom callbacks.
| Prop | Type | Default | Description |
|---|---|---|---|
region | MapRegion | — | { latitude, longitude, latitudeDelta, longitudeDelta } |
markers? | MapMarker[] | [] | Each marker: { id, coordinate, title?, description? } |
showUserLocation? | boolean | false | Overlay the user’s GPS position |
zoomEnabled? | boolean | true | Allow pinch-to-zoom |
scrollEnabled? | boolean | true | Allow pan gestures |
aspectRatio? | number | 16/9 | Container aspect ratio |
onMarkerPress? | (marker: MapMarker) => void | — | Called when a marker is tapped |
accessibilityLabel? | string | 'Map' | Accessibility label |
testID? | string | — | Test identifier |
import { MapView } from '@objectifthunes/limestone-sdk';
<MapView
region={{ latitude: 48.8566, longitude: 2.3522, latitudeDelta: 0.05, longitudeDelta: 0.05 }}
markers={[{ id: 'paris', coordinate: { latitude: 48.8566, longitude: 2.3522 }, title: 'Paris' }]}
showUserLocation
/>
WebView
An inline web view that renders a remote URL or inline HTML.
| Prop | Type | Default | Description |
|---|---|---|---|
uri? | string | — | Remote URL to load |
html? | string | — | Inline HTML string (takes precedence over uri) |
onLoad? | () => void | — | Called when the page finishes loading |
onError? | (error: Error) => void | — | Called on navigation error |
onMessage? | (data: string) => void | — | Called when the page posts a message via window.ReactNativeWebView.postMessage |
injectedJavaScript? | string | — | JavaScript injected after each page load |
aspectRatio? | number | 16/9 | Container aspect ratio |
accessibilityLabel? | string | — | Accessibility label |
testID? | string | — | Test identifier |
import { WebView } from '@objectifthunes/limestone-sdk';
<WebView
uri="https://example.com"
onMessage={(data) => handleMessage(data)}
/>