Description Usage Arguments Examples
Provides a Shiny Widget for Output.
1 | kartsim_shiny_output(outputId, width = "100%", height = "100%")
|
outputId |
The identifier for this widget. |
width |
The width for this widget. |
height |
The height for this widget. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | library(shiny)
ui <- fluidPage(
tags$head(
tags$style(HTML("
#kartsim {
height: 270px !important;
margin-top: 10px;
}
"))
),
kartsim_shiny_output("kartsim"),
textOutput("direction")
)
server <- function(input, output) {
kartsim_shiny_render(
kartsim_play(size)
)
observeEvent(input$done, {
input$direction <- input$direction
})
}
if (interactive()) {
shinyApp(ui = ui, server = server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.