This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/react-native/annotations/create-edit-and-remove/selection-deselection.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Select or deselect annotations in React Native | Nutrient SDK

In some scenarios, it’s useful to select one or more specific annotations programmatically to allow your users to interact with them, or to clear all selected annotations.

Annotation selection

Select annotations programmatically using the selectAnnotations API, passing in the list of annotations to select in Instant JSON format:

const result = await this.pdfRef.current?.selectAnnotations(
annotations,
);

Or, deselect all annotations using the clearSelectedAnnotations API:

const result = await this.pdfRef.current?.clearSelectedAnnotations();