Base component
component
Used for creating a component, which contains additional values from the used component type.
The value specified in type determines the component. Each component has additional properties you can specify.
See the list of types below for links to the pages for each component.
Schema fields #
| Key | Type | Description |
|---|---|---|
component |
String | The type of the component. |
Values from the used component type must be included, like so:
component = {
'component' -> 'button',
'id' -> 'blurple_button',
'style' -> 'primary',
'label' -> 'Blurple button',
'emoji' -> '🚪'
},
Component types#
| String | Description |
|---|---|
action_row |
Action row for multiple buttons in one row or one select menu. |
button |
Button |
string_select |
String select menu for selecting an item. |
user_select |
User select menu for selecting a user. |
role_select |
Role select menu for selecting a role. |
mentionable_select |
Mentionable select menu for selecting a user/role. |
channel_select |
Channel select menu for selecting a channel. |
text_input |
Text input |
label |
Label for wrapping a component with a label and description. |
separator |
Separator that creates a divisor line between components. |
container |
Container that wrap other components in a box while also showing an accent bar on the left side. |
section |
Section that shows an accessory component to the right of the other child components. |
text_display |
Text display for showing markdown text, just like the content in messages. |
thumbnail |
Thumbnail for a thumbnail to a section. |
media_gallery |
Media gallery for showing several images in a gallery. |
file_display |
File display for showing a file to download. |
file_upload |
File upload letting the user upload one or more files. |