Make a app that uses bslib layout_columns to put 3 inputs in the same row. the inputs should be a text input, followed by a shiniWidget switch input and another textinput.
Drop files here
or click to upload
library(shiny)
library(bslib)
library(shinyWidgets)
ui <- page_fluid(
layout_columns(
col_widths = c(4, 4, 4),
textInput("text1", "First Text Input", ""),
switchInput("switch1", "Toggle Switch", value = FALSE),
textInput("text2", "Second Text Input", "")
),
# Add output to show the values
verbatimTextOutput("values")
)
server <- function(input, output, session) {
output$values <- renderPrint({
list(
text1 = input$text1,
switch = input$switch1,
text2 = input$text2
)
})
}
shinyApp(ui, server)
Hi! I can help you with any questions about Shiny and R. What would you like to know?