shinyApp(
  ui = fluidPage(
    theme = shinytheme("cerulean"),
    titlePanel("Reserva de Puestos 🪑"),
    sidebarLayout(
      sidebarPanel(
        h3("Formulario de Reserva"),
        textInput("nombre", "Nombre completo:", ""),
        selectInput("puesto", "Selecciona el puesto:", 
                    choices = c("Puesto 1", "Puesto 2", "Puesto 3", "Puesto 4")),
        dateInput("fecha", "Fecha de reserva:", value = Sys.Date()),
        actionButton("reservar", "Reservar", class = "btn-primary"),
        br(), br(),
        verbatimTextOutput("reservaInfo")
      ),
      mainPanel(
        h4("Confirmación de Reserva"),
        uiOutput("confirmacion")
      )
    )
  ),
  server = function(input, output) {
    observeEvent(input$reservar, {
      output$reservaInfo <- renderText({
        paste("Reserva realizada a nombre de", input$nombre,
              "en el", input$puesto,
              "para el día", input$fecha)
      })
      output$confirmacion <- renderUI({
        tagList(
          strong("Reserva confirmada:"),
          p(paste("Nombre:", input$nombre)),
          p(paste("Puesto:", input$puesto)),
          p(paste("Fecha:", input$fecha))
        )
      })
    })
  }
)
Shiny applications not supported in static R Markdown documents