Versions in this module Expand all Collapse all v1 v1.0.1 Jul 30, 2026 v1.0.0 Jul 30, 2026 Changes in this version + type Button struct + Image string + Text string + func NewButton(text, image string) Button + func NoButton() Button + func YesButton() Button + func (b Button) MarshalJSON() ([]byte, error) + type Closer interface + Close func(submitter Submitter, tx *world.Tx) + type Custom struct + func New(submittable Submittable, title ...any) Custom + func (f Custom) Elements() []Element + func (f Custom) MarshalJSON() ([]byte, error) + func (f Custom) SubmitJSON(b []byte, submitter Submitter, tx *world.Tx) error + func (f Custom) Title() string + type Divider struct + func (d Divider) MarshalJSON() ([]byte, error) + type Dropdown struct + DefaultIndex int + Options []string + Text string + Tooltip string + func NewDropdown(text string, options []string, defaultIndex int) Dropdown + func (d Dropdown) MarshalJSON() ([]byte, error) + func (d Dropdown) Value() int + func (d Dropdown) WithTooltip(tooltip string) Dropdown + type Element interface + type Form interface + SubmitJSON func(b []byte, submitter Submitter, tx *world.Tx) error + type Header struct + Text string + func NewHeader(text string) Header + func (h Header) MarshalJSON() ([]byte, error) + type Input struct + Default string + Placeholder string + Text string + Tooltip string + func NewInput(text, defaultValue, placeholder string) Input + func (i Input) MarshalJSON() ([]byte, error) + func (i Input) Value() string + func (i Input) WithTooltip(tooltip string) Input + type Label struct + Text string + func NewLabel(text string) Label + func (l Label) MarshalJSON() ([]byte, error) + type Menu struct + func NewMenu(submittable MenuSubmittable, title ...any) Menu + func (m Menu) AddButton(button Button) Menu + func (m Menu) AddDivider(divider Divider) Menu + func (m Menu) AddHeader(header Header) Menu + func (m Menu) AddLabel(label Label) Menu + func (m Menu) Body() string + func (m Menu) Buttons() []Button + func (m Menu) Elements() []MenuElement + func (m Menu) MarshalJSON() ([]byte, error) + func (m Menu) SubmitJSON(b []byte, submitter Submitter, tx *world.Tx) error + func (m Menu) Title() string + func (m Menu) WithBody(body ...any) Menu + func (m Menu) WithButtons(buttons ...Button) Menu + func (m Menu) WithElements(elements ...MenuElement) Menu + type MenuElement interface + type MenuSubmittable interface + Submit func(submitter Submitter, pressed Button, tx *world.Tx) + type Modal struct + func NewModal(submittable ModalSubmittable, title ...any) Modal + func (m Modal) Body() string + func (m Modal) Buttons() []Button + func (m Modal) MarshalJSON() ([]byte, error) + func (m Modal) SubmitJSON(b []byte, submitter Submitter, tx *world.Tx) error + func (m Modal) Title() string + func (m Modal) WithBody(body ...any) Modal + type ModalSubmittable MenuSubmittable + type Slider struct + Default float64 + Max float64 + Min float64 + StepSize float64 + Text string + Tooltip string + func NewSlider(text string, min, max, stepSize, defaultValue float64) Slider + func (s Slider) MarshalJSON() ([]byte, error) + func (s Slider) Value() float64 + func (s Slider) WithTooltip(tooltip string) Slider + type StepSlider Dropdown + func NewStepSlider(text string, options []string, defaultIndex int) StepSlider + func (s StepSlider) MarshalJSON() ([]byte, error) + func (s StepSlider) Value() int + func (s StepSlider) WithTooltip(tooltip string) StepSlider + type Submittable interface + Submit func(submitter Submitter, tx *world.Tx) + type Submitter interface + CloseForm func() + SendForm func(form Form) + type Toggle struct + Default bool + Text string + Tooltip string + func NewToggle(text string, defaultValue bool) Toggle + func (t Toggle) MarshalJSON() ([]byte, error) + func (t Toggle) Value() bool + func (t Toggle) WithTooltip(tooltip string) Toggle