# Button

> Create a button for users to click on. Triggers with a new flow and Custom ID.

- ID: `advmsgcmp_interaction_button`
- Type: Block
- Category: [Advanced Messages](https://inventor.bot/docs/reference/blocks/advanced-messages.md)

- Can only be placed inside `respond_interaction_embed_message` (buttons), `send_embed_message` (buttons), `advmsgcmp_layout_section` (accessory), `advmsgcmp_layout_actionrow` (children).

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `custom_id` | yes | Custom ID of the button. Use this to identify the button in the flow where you respond to the button click. | e.g. `"ban_user_123456789012345678"` |
| `label` | yes | Label of the button. | e.g. `"Click me"` |
| `style` | yes | Style of the button. Link buttons must have a URL provided and Custom ID must be blank. | `"primary"`, `"secondary"`, `"success"`, `"danger"`, `"link"`, `"premium"` |
| `url` |  | URL of the button. You can only provide this if you set style to link. | e.g. `"https://example.com"` |
| `emoji` |  | Emoji of the button. Accepts a standard Unicode emoji or Discord custom emoji. |  |
| `disabled` |  | Whether the button is disabled. | `"true"`, `"false"` |
| `sku_id` |  | Identifier for a purchasable SKU. You can only provide this if you set style to premium. | e.g. `"123456789012345678"` |

**Example**

```go
respond_interaction_embed_message(Args{
	color: "#0099ff",
	buttons: func() {
		advmsgcmp_interaction_button(Args{
			custom_id: "ban_user_123456789012345678",
			label:     "Click me",
			style:     "primary",
		})
	},
})
```

## Placement

Can only be placed inside:

- [Embed Reply to Interaction](https://inventor.bot/docs/reference/blocks/interactions/respond-interaction-embed-message.md) (`respond_interaction_embed_message`), in `buttons`
- [Send or Edit Embed Message](https://inventor.bot/docs/reference/blocks/messages/send-embed-message.md) (`send_embed_message`), in `buttons`
- [Section](https://inventor.bot/docs/reference/blocks/advanced-messages/advmsgcmp-layout-section.md) (`advmsgcmp_layout_section`), in `accessory`
- [Action Row](https://inventor.bot/docs/reference/blocks/advanced-messages/advmsgcmp-layout-actionrow.md) (`advmsgcmp_layout_actionrow`), in `children`