> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# SelectorQuery: selectUniqueID() method

APISummary
Select nodes by specifying `uid`. It is usually used to select the corresponding node of the event target.

`uid` is a node's unique id. Each node has a dynamically assigned unique `uid`. `uid` can be obtained through the triggered event.

## Syntax

```ts
selectUniqueID(uniqueId: string | number): NodesRef;
```

### Parameters

#### uniqueId

The `uid` of the node to be selected.

### Return Value

A `NodesRef` object instance representing this query result.

## Examples

Add a background color to the target node of the tap event:

```tsx
const onTap = useCallback((event: ReactLynx.ITouchEvent) => {
  lynx
    .createSelectorQuery()
    .selectUniqueID(event.target.uid)
    .setNativeProps({
      'background-color': 'red',
    })
    .exec();
}, []);
```

## Compatibility

**Compatibility Table**

**Query:** `lynx-api.selector-query.selectUniqueID`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-api/selector-query/selectUniqueID.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| selectUniqueID | Yes (2.3) | Yes (3.4) | Yes (2.3) | Yes (3.7) | Yes (3.7) | Yes |

**`selectUniqueID`**

Select nodes by specifying `uid`.

