> For the complete documentation index, see [llms.txt](https://seveenxp.gitbook.io/lunaris/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://seveenxp.gitbook.io/lunaris/components/createbutton.md).

# createButton()

A simple function that facilitates the creation of buttons.

```typescript
// To create a button using discord.js
import { ButtonBuilder, ButtonStyle } from 'discord.js' // Module ESM
const { ButtonBuilder, ButtonStyle } = require('discord.js') // Module CommonJS

new ButtonBuilder({
    label: 'Lunaris', customId: 'Package',
    style: ButtonStyle.Primary
});

// To create a button using lunaris
import { createButton } from 'lunaris' // Module ESM
const { createButton } = require('lunaris') // Module CommonJS

createButton({
    label: 'Lunaris', buttonId: 'Package',
    style: 'Primary'
});
```

#### Button Parameters

| Parameters                          | Types       | Required  |
| ----------------------------------- | ----------- | --------- |
| **label**                           | **string**  | **true**  |
| **buttonId**                        | **string**  | **true**  |
| [**style**](#user-content-fn-1)[^1] | **string**  | **true**  |
| **emoji**                           | **string**  | **false** |
| **disabled**                        | **boolean** | **false** |

[^1]: Styles: Primary | Secondary | Success | danger
