[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7087":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":18,"lastSyncTime":33,"discoverSource":34},7087,"react-native-camera-kit","teslamotors\u002Freact-native-camera-kit","teslamotors","A high performance, easy to use, rock solid camera library for React Native apps.","",null,"Swift",2693,625,190,84,0,1,2,6,3,30.39,"MIT License",false,"master",[26,27,28,29],"android","camera","ios","react-native","2026-06-12 02:01:34","\u003Ch1 align=\"center\">\n    🎈 React Native Camera Kit\n\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  A \u003Cstrong>high performance, easy to use, rock solid\u003C\u002Fstrong>\u003Cbr>\n  camera library for React Native apps.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fteslamotors\u002Freact-native-camera-kit\u002Fblob\u002Fmaster\u002FLICENSE\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg\" alt=\"React Native Camera Kit is released under the MIT license.\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.org\u002Fpackage\u002Freact-native-camera-kit\">\n    \u003Cimg src=\"https:\u002F\u002Fbadge.fury.io\u002Fjs\u002Freact-native-camera-kit.svg\" alt=\"Current npm package version.\" \u002F>\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd>\n      \u003Cimg src=\"images\u002Fscreenshot.jpg\"\u002F>\n    \u003C\u002Ftd>\n    \u003Ctd>\n      \u003Cul>\n        \u003Cli>\u003Ch3>Cross Platform (iOS and Android)\u003C\u002Fh3>\u003C\u002Fli>\n        \u003Cli>\u003Ch3>Optimized for performance and high photo capture rate\u003C\u002Fh3>\u003C\u002Fli>\n        \u003Cli>\u003Ch3>QR \u002F Barcode scanning support\u003C\u002Fh3>\u003C\u002Fli>\n        \u003Cli>\u003Ch3>Camera preview support in iOS simulator\u003C\u002Fh3>\u003C\u002Fli>\n      \u003C\u002Ful>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n## Installation (RN > 0.60)\n\n```bash\nyarn add react-native-camera-kit\n```\n\n```bash\ncd ios && pod install && cd ..\n```\n\nAndroid:\n[Review your Kotlin configuration](.\u002Fdocs\u002Fkotlin.md) to ensure it's compatible with this library.\n\n## Permissions\n\nYou must use a separate library for prompting the user for permissions before rendering the `\u003CCamera ...\u002F>` component.  \nWe recommend zoontek's library, react-native-permissions:\nhttps:\u002F\u002Fgithub.com\u002Fzoontek\u002Freact-native-permissions#ios-flow\n\n**If you fail to prompt for permission, the camera will appear blank \u002F black.**\n\n### Why no permissions API?\n\nConceptually, permissions are simple: Granted \u002F Denied.  \nHowever, in reality it's not that simple due to privacy enhancements on iOS and Android.\n\n[Here's an example diagram from react-native-permissions's README](https:\u002F\u002Fgithub.com\u002Fzoontek\u002Freact-native-permissions#ios-flow), which illustrates the complexity of the user-experience, which we don't want to duplicate in a camera library:\n\n```\n   ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n   ┃ check(PERMISSIONS.IOS.CAMERA) ┃\n   ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n                   │\n       Is the feature available\n           on this device ?\n                   │           ╔════╗\n                   ├───────────║ NO ║──────────────┐\n                   │           ╚════╝              │\n                ╔═════╗                            ▼\n                ║ YES ║                 ┌─────────────────────┐\n                ╚═════╝                 │ RESULTS.UNAVAILABLE │\n                   │                    └─────────────────────┘\n           Is the permission\n             requestable ?\n                   │           ╔════╗\n                   ├───────────║ NO ║──────────────┐\n                   │           ╚════╝              │\n                ╔═════╗                            ▼\n                ║ YES ║                  ┌───────────────────┐\n                ╚═════╝                  │ RESULTS.BLOCKED \u002F │\n                   │                     │ RESULTS.LIMITED \u002F │\n                   │                     │  RESULTS.GRANTED  │\n                   ▼                     └───────────────────┘\n          ┌────────────────┐\n          │ RESULTS.DENIED │\n          └────────────────┘\n                   │\n                   ▼\n  ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n  ┃ request(PERMISSIONS.IOS.CAMERA) ┃\n  ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n                   │\n         Does the user accept\n            the request ?\n                   │           ╔════╗\n                   ├───────────║ NO ║──────────────┐\n                   │           ╚════╝              │\n                ╔═════╗                            ▼\n                ║ YES ║                   ┌─────────────────┐\n                ╚═════╝                   │ RESULTS.BLOCKED │\n                   │                      └─────────────────┘\n                   ▼\n          ┌─────────────────┐\n          │ RESULTS.GRANTED │\n          └─────────────────┘\n```\n\nIn earlier versions of react-native-camera-kit, permissions were provided with an API, but for the above reasons, these APIs will be removed.\n\n#### Android\n\nAdd the following uses-permission to your `AndroidManifest.xml` (usually found at: `android\u002Fsrc\u002Fmain\u002F`)\n\n```java\n\u003Cuses-permission android:name=\"android.permission.CAMERA\" \u002F>\n\u003Cuses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"\u002F>\n```\n\n#### iOS\n\nAdd the following usage descriptions to your `Info.plist` (usually found at: `ios\u002FPROJECT_NAME\u002F`)\n\n```xml\n\u003Ckey>NSCameraUsageDescription\u003C\u002Fkey>\n\u003Cstring>For taking photos\u003C\u002Fstring>\n\n\u003Ckey>NSPhotoLibraryUsageDescription\u003C\u002Fkey>\n\u003Cstring>For saving photos\u003C\u002Fstring>\n```\n\n## Running the example project\n\n- `yarn bootstrap`\n- `yarn example ios` or `yarn example android`\n\n## Components\n\n### Camera\n\nBarebones camera component if you need advanced\u002Fcustomized interface\n\n```ts\nimport { Camera, CameraType } from 'react-native-camera-kit';\n```\n\n```tsx\n\u003CCamera\n  ref={(ref) => (this.camera = ref)}\n  cameraType={CameraType.Back} \u002F\u002F front\u002Fback(default)\n  flashMode=\"auto\"\n\u002F>\n```\n\n#### Barcode \u002F QR Code Scanning\n\nAdditionally, the Camera can be used for barcode scanning\n\n```tsx\n\u003CCamera\n  ...\n  \u002F\u002F Barcode props\n  scanBarcode={true}\n  onReadCode={(event) => Alert.alert('QR code found')} \u002F\u002F optional\n  showFrame={true} \u002F\u002F (default false) optional, show frame with transparent layer (qr code or barcode will be read on this area ONLY), start animation for scanner, that stops when a code has been found. Frame always at center of the screen\n  laserColor='red' \u002F\u002F (default red) optional, color of laser in scanner frame\n  frameColor='white' \u002F\u002F (default white) optional, color of border of scanner frame\n\u002F>\n```\n\n### Camera Props (Optional)\n\n| Props                           | Type                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                |\n| ------------------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `ref`                           | Ref                                    | Reference on the camera view                                                                                                                                                                                                                                                                                                                                                                                                                               |\n| `style`                         | StyleProp\\\u003CViewStyle>                  | Style to apply on the camera view                                                                                                                                                                                                                                                                                                                                                                                                                          |\n| `flashMode`                     | `'on'`\u002F`'off'`\u002F`'auto'`                | Camera flash mode. Default: `auto`                                                                                                                                                                                                                                                                                                                                                                                                                         |\n| `focusMode`                     | `'on'`\u002F`'off'`                         | Camera focus mode. Default: `on`                                                                                                                                                                                                                                                                                                                                                                                                                           |\n| `zoomMode`                      | `'on'`\u002F`'off'`                         | Enable the pinch to zoom gesture. Default: `on`. If `on`, you must pass `zoom` as `undefined` or avoid setting `zoomMode` to allow pinch to zoom                                                                                                                                                                                                                                                                                                           |\n| `zoom`                          | `number`                               | Control the zoom. Default: `1.0`                                                                                                                                                                                                                                                                                                                                                                                                                           |\n| `maxZoom`                       | `number`                               | Maximum zoom allowed (but not beyond what camera allows). Default: `undefined` (camera default max)                                                                                                                                                                                                                                                                                                                                                        |\n| `onZoom`                        | Function                               | Callback when user makes a pinch gesture, regardless of what the `zoom` prop was set to. Returned event contains `zoom`. Ex: `onZoom={(e) => console.log(e.nativeEvent.zoom)}`.                                                                                                                                                                                                                                                                            |\n| `torchMode`                     | `'on'`\u002F`'off'`                         | Toggle flash light when camera is active. Default: `off`                                                                                                                                                                                                                                                                                                                                                                                                   |\n| `cameraType`                    | CameraType.Back\u002FCameraType.Front       | Choose what camera to use. Default: `CameraType.Back`                                                                                                                                                                                                                                                                                                                                                                                                      |\n| `onOrientationChange`           | Function                               | Callback when physical device orientation changes. Returned event contains `orientation`. Ex: `onOrientationChange={(event) => console.log(event.nativeEvent.orientation)}`. Use `import { Orientation } from 'react-native-camera-kit'; if (event.nativeEvent.orientation === Orientation.PORTRAIT) { ... }` to understand the new value                                                                                                                  |\n| `allowedBarcodeTypes`           | string[]                               | Limits which barcode formats can be detected. Ex: `['code-128', 'code-39', 'code-93', 'codabar', 'ean-13', 'ean-8', 'itf', 'upc-a', 'upc-e', 'pdf-417', 'aztec', 'data-matrix', 'code-128']`. If empty or omitted, all supported formats are scanned.                                                                                                                                                                                                      |\n| **Android only**                |\n| `onError`                       | Function                               | Android only. Callback when camera fails to initialize. Ex: `onError={(e) => console.log(e.nativeEvent.errorMessage)}`.                                                                                                                                                                                                                                                                                                                                    |\n| `shutterPhotoSound`             | `boolean`                              | Android only. Enable or disable the shutter sound when capturing a photo. Default: `true`                                                                                                                                                                                                                                                                                                                                                                  |\n| **iOS only**                    |\n| `ratioOverlay`                  | `'int:int'`                            | Show a guiding overlay in the camera preview for the selected ratio. Does not crop image as of v9.0. Example: `'16:9'`                                                                                                                                                                                                                                                                                                                                     |\n| `ratioOverlayColor`             | Color                                  | Any color with alpha. Default: `'#ffffff77'`                                                                                                                                                                                                                                                                                                                                                                                                               |\n| `resetFocusTimeout`             | `number`                               | Dismiss tap to focus after this many milliseconds. Default `0` (disabled). Example: `5000` is 5 seconds.                                                                                                                                                                                                                                                                                                                                                   |\n| `resetFocusWhenMotionDetected`  | Boolean                                | Dismiss tap to focus when focus area content changes. Native iOS feature, see documentation: https:\u002F\u002Fdeveloper.apple.com\u002Fdocumentation\u002Favfoundation\u002Favcapturedevice\u002F1624644-subjectareachangemonitoringenabl?language=objc). Default `true`.                                                                                                                                                                                                               |\n| `resizeMode`                    | `'cover' \u002F 'contain'`                  | Determines the scaling and cropping behavior of content within the view. `cover` (resizeAspectFill on iOS) scales the content to fill the view completely, potentially cropping content if its aspect ratio differs from the view. `contain` (resizeAspect on iOS) scales the content to fit within the view's bounds without cropping, ensuring all content is visible but may introduce letterboxing. Default behavior depends on the specific use case. |\n| `scanThrottleDelay`             | `number`                               | Duration between scan detection in milliseconds. Default 2000 (2s)                                                                                                                                                                                                                                                                                                                                                                                         |\n| `maxPhotoQualityPrioritization` | `'balanced'` \u002F `'quality'` \u002F `'speed'` | [iOS 13 and newer](https:\u002F\u002Fdeveloper.apple.com\u002Fdocumentation\u002Favfoundation\u002Favcapturephotooutput\u002F3182995-maxphotoqualityprioritization). `'speed'` provides a 60-80% median capture time reduction vs 'quality' setting. Tested on iPhone 6S Max (66% faster) and iPhone 15 Pro Max (76% faster!). Default `balanced`                                                                                                                                        |\n| `iOsDeferredStart`              | `boolean`                              | iOS 26+ only. Enables `AVCaptureOutput.deferredStartEnabled` when supported to get the preview visible faster. Default `true`. When enabled, the first capture can be delayed by a few hundred milliseconds. Ignored on Android and on older iOS versions.                                                                                                                                                                                                   |\n| `onCaptureButtonPressIn`        | Function                               | Callback when iPhone capture button is pressed in or Android volume or camera button is pressed in. Ex: `onCaptureButtonPressIn={() => console.log(\"volume button pressed in\")}`                                                                                                                                                                                                                                                                           |\n| `onCaptureButtonPressOut`       | Function                               | Callback when iPhone capture button is released or Android volume or camera button is released. Ex: `onCaptureButtonPressOut={() => console.log(\"volume button released\")}`                                                                                                                                                                                                                                                                                |\n| **Barcode only**                |\n| `scanBarcode`                   | `boolean`                              | Enable barcode scanner. Default: `false`                                                                                                                                                                                                                                                                                                                                                                                                                   |\n| `showFrame`                     | `boolean`                              | Show frame in barcode scanner. Default: `false`                                                                                                                                                                                                                                                                                                                                                                                                            |\n| `barcodeFrameSize`              | `object`                               | Frame size of barcode scanner. Default: `{ width: 300, height: 150 }`                                                                                                                                                                                                                                                                                                                                                                                      |\n| `laserColor`                    | Color                                  | Color of barcode scanner laser visualization. Default: `red`                                                                                                                                                                                                                                                                                                                                                                                               |\n| `frameColor`                    | Color                                  | Color of barcode scanner frame visualization. Default: `yellow`                                                                                                                                                                                                                                                                                                                                                                                            |\n| `onReadCode`                    | Function                               | Callback when scanner successfully reads barcode. Returned event contains `codeStringValue`. Default: `null`. Ex: `onReadCode={(event) => console.log(event.nativeEvent.codeStringValue)}`                                                                                                                                                                                                                                                                 |\n\n### Imperative API\n\n_Note: Must be called on a valid camera ref_\n\n#### capture()\n\nCapture image as JPEG.\n\nA temporary file is created. You _must_ move this file to a permanent location (e.g. the app's 'Documents' folder) if you need it beyond the current session of the app as it may be deleted when the user leaves the app. You can move files by using a file system library such as [react-native-fs](https:\u002F\u002Fgithub.com\u002Fitinance\u002Freact-native-fs) or [expo-filesystem](https:\u002F\u002Fdocs.expo.io\u002Fversions\u002Flatest\u002Fsdk\u002Ffilesystem\u002F).\n(On Android we currently have an unsupported `outputPath` prop but it's subject to change at any time).\n\nNote that the reason you're getting a URL despite it being a file is because Android 10+ encourages URIs. To keep things consistent regardless of settings or platform we always send back a URI.\n\n```ts\nconst { uri } = await this.camera.capture();\n\u002F\u002F uri = 'file:\u002F\u002F\u002Fdata\u002Fuser\u002F0\u002Fcom.myorg.myapp\u002Fcache\u002Fckcap123123123123.jpg'\n```\n\nIf you want to store it permanently, here's an example using [react-native-fs](https:\u002F\u002Fgithub.com\u002Fitinance\u002Freact-native-fs):\n\n```ts\nimport RNFS from 'react-native-fs';\n\u002F\u002F [...]\nlet { uri } = await this.camera.capture();\nif (uri.startsWith('file:\u002F\u002F')) {\n  \u002F\u002F Platform dependent, iOS & Android uses '\u002F'\n  const pathSplitter = '\u002F';\n  \u002F\u002F file:\u002F\u002F\u002Ffoo\u002Fbar.jpg => \u002Ffoo\u002Fbar.jpg\n  const filePath = uri.replace('file:\u002F\u002F', '');\n  \u002F\u002F \u002Ffoo\u002Fbar.jpg => [foo, bar.jpg]\n  const pathSegments = filePath.split(pathSplitter);\n  \u002F\u002F [foo, bar.jpg] => bar.jpg\n  const fileName = pathSegments[pathSegments.length - 1];\n\n  await RNFS.moveFile(filePath, `${RNFS.DocumentDirectoryPath}\u002F${fileName}`);\n  uri = `file:\u002F\u002F${destFilePath}`;\n}\n```\n\n## Using with Expo\n\nIf you are using Expo Managed Workflow, you can use this library with a third-party plugin `expo-react-native-camera-kit`.\n\n[See more here](https:\u002F\u002Fgithub.com\u002Favantstay\u002Fexpo-react-native-camera-kit)\n\n## Contributing\n\n- Pull Requests are welcome, if you open a pull request we will do our best to get to it in a timely manner\n- Pull Request Reviews are even more welcome! we need help testing, reviewing, and updating open PRs\n- If you are interested in contributing more actively, please contact us.\n\n## License\n\nThe MIT License.\n\nSee [LICENSE](LICENSE)\n","React Native Camera Kit 是一个高性能、易于使用且非常稳定的React Native应用相机库。它支持跨平台（iOS和Android），优化了性能以实现高照片捕获率，并提供了二维码\u002F条形码扫描功能以及iOS模拟器中的相机预览支持。该项目采用Swift编写，拥有MIT许可证，适用于需要在移动应用中集成相机功能的场景，如社交软件中的图片分享、购物应用的商品扫码等。通过简单的安装步骤即可快速集成到项目中，但需注意用户权限处理需单独配置。","2026-06-11 03:10:27","top_language"]