---
title: Custom Click Action
description: "Configuration 0x08, client → server."
---

`config` · `0x08` · **serverbound** (client → server)

Sent when the player clicks a text component or dialog control with a `custom` click action. It carries the action id and an optional NBT payload. The server handles it in its own way; vanilla only exposes it to plugins and datapack dialogs.

Sent by the client, read by the server. Listen for it with `client.on("CustomClickAction", (data) => …)` on the receiving side.

## Fields

| Field | Type | Notes |
|---|---|---|
| `id` | String |  |
| `nbt` | Byte[] |  |

## Send it

```ts
await client.sendPacket("CustomClickAction", {
  id: "example:open_menu",
  nbt: { selectedPage: 2 },
});
```

The action `id` and optional NBT payload are defined by the server-provided dialog or text component. Use `null` for `nbt` when the action has no payload.

Field aliases listed under Notes are accepted as alternative keys when writing.

Source: [`src/Core/Versions/776/Packets/config/serverbound/CustomClickAction.ts`](https://github.com/GDLev/mc-protocol/blob/master/src/Core/Versions/776/Packets/config/serverbound/CustomClickAction.ts)
