# Blur the background in React Native

> Enable subject segmentation and set normalized blur strength through the Nosmai React Native API.

> For AI agents: the complete documentation index is at https://nosmai.com/llms/effects.txt

Product: Nosmai Effects
Group: guide
Source: https://nosmai.com/docs/effects/guides/background/blur-the-background/react-native/

## Prerequisites

- A working [React Native quickstart](/docs/effects/quickstart/react-native/)
- Background effects enabled for the project

## Enable blur

```tsx
if (await NosmaiCameraSdk.isAdvancedFiltersEnabled()) {
  await NosmaiCameraSdk.setBackground({
    mode: 'blur',
    blurStrength: 0.55,
  });
}
```

`blurStrength` uses `0` through `1` in the React Native API.

## Disable blur

```tsx
await NosmaiCameraSdk.clearBackground();
```

## Verify it worked

The native preview should keep the subject visible while blurring the scene
behind it.

## Common errors

| Symptom | Fix |
| --- | --- |
| Promise resolves but nothing changes | Wait for `onReady` and verify advanced filters are enabled |
| Preview remounts while dragging | Keep a stable `NosmaiCameraView` and update only the native value |
| Low frame rate in Debug | Measure a Release build on a physical device |

## Next steps

- [Replace the background in React Native](/docs/effects/guides/background/replace-the-background/react-native/)
- [Review React Native support](/docs/effects/platforms/react-native/)

## References

- [Limits and performance](/docs/effects/limits-and-performance/)
