> For the complete documentation index, see [llms.txt](https://api2-ekycapis.innov8tif.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api2-ekycapis.innov8tif.com/okaycam-mobile-sdk/okaycam-plus-mobile-sdk/okaycam-plus-react-native/development-guide-face-capture.md).

# Development Guide (Face Capture)

## OkayCam Selfie

### Configuration

<table><thead><tr><th width="167">-</th><th>Property Name</th><th>Description</th><th>Default Value</th></tr></thead><tbody><tr><td>-</td><td>width</td><td>width to resize the image</td><td>null</td></tr><tr><td>-</td><td>imageQuality</td><td>quality of image</td><td>1.0 (range from 0.0 to 1.0)</td></tr><tr><td>topLabel</td><td>text</td><td>text of the top label</td><td>Please align your face within the frame</td></tr><tr><td>topLabel</td><td>color</td><td>color of the top label</td><td>#FFFFFF</td></tr><tr><td>topLabel</td><td>size</td><td>text size of the top label</td><td>24</td></tr><tr><td>-</td><td>bottomFrameColor</td><td>color of the bottom frame</td><td>#EB6709</td></tr><tr><td>switchBtnConfig</td><td>color</td><td>color of the switch button</td><td>#FFFFFFswitchBtnConfig</td></tr><tr><td>switchBtnConfig</td><td>show</td><td>show or hide the camera switch button</td><td>true</td></tr><tr><td>confirmBtnConfig</td><td>backgroundColor</td><td>background color of the confirm button</td><td>#ffa500</td></tr><tr><td>confirmBtnConfig</td><td>contentColor</td><td>content color of the confirm button</td><td>#ffffff</td></tr><tr><td>retakeBtnConfig</td><td>backgroundColor</td><td>background color of the retake button</td><td>#ffa500</td></tr><tr><td>retakeBtnConfig</td><td>contentColor</td><td>content color of the retake button</td><td>#ffffff</td></tr><tr><td>-</td><td>captureBtnColor</td><td>color of the capture button</td><td>#FFFFFF</td></tr><tr><td>-</td><td>defaultCameraFacing</td><td>initial camera facing when the selfie cam is launched</td><td>CameraFacing.FRONT</td></tr></tbody></table>

### Usage

```
import { captureSelfie } from "react-native-okaycamplus"

captureSelfie(
	license,
	false,
	{
		topLabel: {
			text: "Align you face within the frame",
			color: "#4287f5",
			size: 20
		},
		bottomFrameColor: "#4287f5",
		captureBtnColor: "#ffffff",
		switchBtnConfig: {
			color: "#ffffff",
			show: true
		},
        confirmBtnConfig: {
            backgroundColor: "#4287f5",
            contentColor: "#000000"
        },
        retakeBtnConfig: {
            backgroundColor: "#4287f5",
            contentColor: "#000000"
        },
		defaultCameraFacing: "front",
		width: 1000,
        imageQuality: 1.0
	}
)
	.then(result => {
		console.log(result)
	})
	.catch(error => {
		console.log(error)
	})

```

### Results

| Result      | Description           |
| ----------- | --------------------- |
| selfieImage | Captured selfie image |

***

### OkayCam Selfie Plus

### Usage

```
import { captureSelfiePlus } from "react-native-okaycamplus"

captureSelfiePlus(
	license,
	false
)
	.then(result => {
		console.log(result)
	})
	.catch(error => {
		console.log(error)
	})

```

### Result

| Result                                                | Description                                                                 |
| ----------------------------------------------------- | --------------------------------------------------------------------------- |
| { selfie: selfie\_image\_path, bundle: base64String } | Captured selfie image path and encrypted bundle to pass to OkayFacePlus API |
