Builders for modals and their inputs. Open one with
Lingo.Context.show_modal/2; the submission reaches
Lingo.Bot.handle_modal/2, with field values keyed by custom id.
show_modal!(ctx, Modal.modal("feedback", "Feedback", [
Modal.label("Subject", Modal.text_input("subject", required: true)),
Modal.label("Details", Modal.text_input("body", style: :paragraph))
]))
Summary
Functions
A checkbox. Option: :default.
A multiple-choice group. Options: :min_values, :max_values and :required.
A file upload field. Options: :min_values, :max_values, :required and :file_types.
A label and optional :description around an input.
A modal with a title and up to 5 labeled inputs.
A single-choice group. Option: :required.
A text field. Options: :style (:short or :paragraph), :placeholder,
:min_length, :max_length, :required and :value. Wrap it in
label/3, or give the label as the second argument.
Functions
A checkbox. Option: :default.
A multiple-choice group. Options: :min_values, :max_values and :required.
A file upload field. Options: :min_values, :max_values, :required and :file_types.
A label and optional :description around an input.
A modal with a title and up to 5 labeled inputs.
A single-choice group. Option: :required.
A text field. Options: :style (:short or :paragraph), :placeholder,
:min_length, :max_length, :required and :value. Wrap it in
label/3, or give the label as the second argument.