shinylive and Quarto

How to embed a Shiny app in a Quarto revealjs

Hello Shiny

#| standalone: true
#| components: [editor, viewer]
#| column: screen-inset-shaded
library("shiny")

## INSERT `ui` and `server` CODE HERE ##
ui <- fluidPage(
  numericInput("obs", "Number of observations:",
    min = 0, max = 1000, value = 500
  ),
  plotOutput("distPlot")
)

# Server logic
server <- function(input, output) {
  output$distPlot <- renderPlot({
    hist(rnorm(input$obs))
  })
}

# Complete app with UI and server components
shinyApp(ui, server)