# Privacy helpers

Mask sensitive elements, leave them out of session replays, and give elements a stable ID that targeting can rely on.

Privacy helpers control how an element of your interface appears in [session replays](https://developers.screeb.app/sdk-react-native/session-replay). Use them on content the workspace settings do not hide already: a card number in a custom field, a block with personal details, an account balance.

The privacy level an admin sets for the workspace decides what replays hide automatically, see [Protect privacy in session replays](https://help.screeb.app/observe/session-replay-privacy/). The helpers hide more, whatever that level.

There are three helpers:

- **Mask text**: the element stays in the replay, its text is hidden.
- **No capture**: the element and its children are left out of the replay.
- **Stable ID**: the element gets an ID that survives redesigns, so the element targeting of in-app messages and product tours keeps finding it. Use a snake_case name that says what the element is, not where it sits (`checkout_button`), and keep it the same across releases.

```tsx
import { Button, Text, TextInput } from "react-native";
import { ScreebId, ScreebMaskText, ScreebNoCapture } from "@screeb/react-native";

export function CheckoutScreen({ address, onCheckout }: { address: string; onCheckout: () => void }) {
  return (
    <>
      <ScreebMaskText>
        <TextInput placeholder="Card number" />
      </ScreebMaskText>
      <ScreebNoCapture>
        <Text>{address}</Text>
      </ScreebNoCapture>
      <ScreebId id="checkout_button">
        <Button title="Checkout" onPress={onCheckout} />
      </ScreebId>
    </>
  );
}
```

On mobile, a masked view shows as a gray block, its children included. Screeb also masks, without any helper, secure text fields and the views whose accessibility identifier, accessibility label, content description or resource name contains a sensitive word such as `password`, `cvv`, `card`, `ssn` or `pin`. In Flutter, a native view embedded with a `PlatformView` takes the iOS or Android helper on the underlying view.
