> ## Documentation Index
> Fetch the complete documentation index at: https://developers.mageloyalty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# openSidebar

> Programmatically open the Mage loyalty sidebar.

Open the Mage loyalty sidebar. Use this to trigger the sidebar from custom buttons or events on your storefront.

## Usage

```javascript theme={null}
MageSDK.openSidebar();
```

## Parameters

None.

## Returns

`void` — this method does not return a value.

## Example: Custom loyalty button

```html theme={null}
<button onclick="MageSDK.openSidebar()">View My Rewards</button>
```

## Example: Open after earning points

```javascript theme={null}
// After a customer completes an action, open the sidebar to show their updated points
MageSDK.openSidebar();
```
