---
name: "showMenuButton"
mode: "kit"
versionRequirements:
  - { name: "MiniKit", version: "2.5.0" }
platform:
  - "iOS"
  - "Android"
async: true
---

## showMenuButton

> [VERSION] MiniKit >= 2.5.0

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Show the capsule button at the top right

### Parameters

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `complete` | `() => void` | No | - | Callback invoked when the API call completes (regardless of success or failure) |
| `success` | `() => void` | No | - | Callback invoked when the API call succeeds |
| `fail` | `(params: Object) => void` ↓see below | No | - | Callback invoked when the API call fails |

#### fail callback parameters

| Property | Type | Description |
| --- | --- | --- |
| `errorMsg` | `string` | Error message |
| `errorCode` | `string \| number` | Error code |
| `innerError` | `Object` | Error extension |

##### fail(params).innerError properties

| Property | Type | Description |
| --- | --- | --- |
| `errorCode` | `string \| number` | Extended error code |
| `errorMsg` | `string` | Extended error information |


### Examples

```tsx
ty.showMenuButton({
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});
```
