library(shiny)
ui <- fluidPage(
textInput("name", "What is your name?"),
actionButton("greet", "Greet"),
textOutput("greeting"),
tags$br(),
# consistenly sized box and consistent across OS
tags$div(
id = "custom_div",
style = "width: 100px;height: 100px;"
)
)
server <- function(input, output, session) {
output$greeting <- renderText({
shiny::req(input$greet)
paste0("Hello ", shiny::isolate(input$name), "!")
})
}
shinyApp(ui, server)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.