create three buttons in a single line
Drop files here
or click to upload
import streamlit as st
st.title("Buttons in a single line")
left_padding, right_padding = 2, 2
cols = st.columns([left_padding, 1, 1, 1, left_padding])
with cols[1]:
first = st.button('First')
with cols[2]:
second = st.button('Second')
with cols[3]:
third = st.button('Third')
if first:
st.write("First was clicked!")
if second:
st.write("Second was clicked!")
if third:
st.write("third was clicked!")
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?