Skip to main content

Components

All visual and interactive elements are defined in the components: section.

Each component has a unique name and a required type:. For example type: text.

Dialog components follow a three-phase layout:

  1. Text and item components are always rendered at the top
  2. Input components (like input, option, range, boolean) are placed in the middle
  3. Buttons appear at the bottom

Within each section, you can arrange components in any order you like using the layout: map — but they will always group by type in this top-middle-bottom structure.

Available Component Types

TypeDescriptionOrder Location
textSimple text labels with formattingTop
itemInventory item-style icon with textTop
inputFreeform text input fieldMiddle
optionDropdown selection from fixed listMiddle
rangeSlider-style number selectorMiddle
booleanToggle switch (true/false)Middle
buttonClickable button that runs actionsBottom

Form Behavior & Rendering

  • The layout: controls component order arrangement (columns are left to right).
  • Components listed under the same order key will only display one based on condition logic (whichever is met from top to bottom).
  • The columns: value influences how many elements can appear per row.
  • All user inputs are saved to placeholders like %commandpanels_session_<component-name>%.

Example:

  • If your component is inp0, use %commandpanels_session_inp0% to access its value.
Use buttons for Commands

Only buttons can execute Command Actions. Input fields will add session data based on the component name, you can execute commands with the values of other input components from the panel.

Component Configuration

Each component has its own configuration schema. Most custom values will have a default value if they are not included in the panel.

Text Component

Displays body/standard text. Use multiple text blocks.

type: text
name: '&6Welcome to the CommandPanels Dialog'

Item Component

Follow the same item format options available in Inventory Panels for items here.

type: 'item'
material: 'STONE'
name: 'item name>'
text: 'text displayed next to the item'
...etc

Input Component

Text input entry box. If multiline, rows and height must both be defined values. Remove multiline options to keep input box as a single line input.

type: 'input'
width: 'custom width of element'
name: 'label above field'
initial: 'default text in text box'
max-length: 'maximum length input can be'
multiline-rows: 3
multiline-height: 200

Option Component

Dropdown menu with choices.

type: 'option'
name: 'label above dropdown'
width: 'custom width of element'
initial: 'default selected value'
options:
- 'Survival'
- 'Creative'
- 'Spectator'

Range Component

Number slider input for number ranges.

type: 'range'
name: 'label above slider'
width: 'custom width of element'
initial: 'default value'
step: 'value increment amount when moved'
start: 'minimum value'
end: 'maximum value'

Boolean Component

Toggle between true and false.

type: 'boolean'
name: 'field label'
initial: 'true or false'

Button Component

Clickable UI buttons that trigger actions.

type: 'button'
name: 'display text'
width: 'custom width of element'
url: 'include with a valid URL to open a link instead of executing commands'
clipboard: 'copy text to clipboard instead of executing commands'
tooltip: 'text that displays when hovering over button'
actions:
commands:
- '[msg] clicked the button'