Input widgets
With widgets, Jeamlit allows you to bake interactivity directly into your apps with buttons, sliders, text inputs, and more.
Button elements
Button
Display a button widget.
boolean clicked = Jt.button("Click me").use();
Form button
Display a form submit button. For use with Jt.form
.
boolean submitted = Jt.formSubmitButton("Sign up").use();

Page link
Display a link to another page in a multipage app.
Jt.pageLink(HomePage.class).use();
Jt.pageLink("https://example.com", "Go to site").use();
Selection elements

Checkbox
Display a checkbox widget.
boolean selected = Jt.checkbox("I agree").use();

Radio
Display a radio button widget.
String choice = Jt.radio("Pick one", List.of("cats", "dogs")).use();

Selectbox
Display a select widget.
String choice = Jt.selectbox("Pick one", List.of("cats", "dogs"))

Toggle
Display a toggle widget.
boolean activated = Jt.toggle("Activate").use();
Numeric input elements

Number input
Display a numeric input widget.
Number choice = Jt.numberInput("Pick a number").use();

Slider
Display a slider widget.
int number = Jt.slider("Pick a number").use();
Date and time input elements

Date input
Display a date input widget.
LocalDate date = Jt.dateInput("Your birthday").use();
Text input elements

Text input
Display a single-line text input widget.
String name = Jt.textInput("First name").use();

Text area
Display a multi-line text input widget.
String text = Jt.textArea("Text to translate").use();
Other input elements

File uploader
Display a file uploader widget.
UploadedFile data = Jt.fileUploader("Upload a CSV").use();
Still have questions?
Go to our discussions forum for helpful information and advice from Jeamlit experts.