Skip to main content

Form Component

Form TypeComponent Type
SimpleButton
ModalContent, Button 1, Button 2
CustomLabel, Input, Slider, Step slider, Toggle, Dropdown

Button

<name>:
title: "Hi"
image:
type: "path"
data: ""
click_commands:
- '[player] spawn'
tip

Image type can be path or url

  • Path is a path to texture in your resource pack.
  • Url is the URL to your image (clients may have a delay in seeing it because they need to download it)

Button 1 & Button 2

button-1:
title: "Yes"
button-2:
title: "No"
caution

Modal Form only has 2 buttons like this, so you can't add more.

Label

<name>:
title: "&fWlecome to DeluxeForms"
type: LABEL

Input

<name>:
title: "&bPlease enter your review our us"
type: INPUT
component:
placeholder: "Type here"
default-input: ""
click_commands:
- "[chat] Thank you for {0}"

Slider

<name>:
title: "Amount"
type: SLIDER
component:
min: 0
max: 100
step: 1
default-value: 0
click_commands:
- "[console] time set day"
- "[console] say {0}"

Step slider

<name>:
title: "Step slider"
type: STEP_SLIDER
component:
steps:
- "Option 1"
- "Option 2"
click_commands:
- ""
- ""
caution

Step slider behavior is slightly different; it will run the command based on the index step player chooses.

Toggle

<name>:
title: "label"
type: TOGGLE
component:
default-value: true
click_commands:
#true
- "[console] day"
#false
- "[console] night"
<name>:
title: "Drop down"
type: DROPDOWN
component:
default-element: 0
elements:
- "Option 1"
- "Option 2"
click_commands:
- "[console] say 1"
- "[console] say 2"
note

Same behavior as the step slider