diff --git a/inst/examples/01_hello/app.R b/inst/examples/01_hello/app.R index 887c50576d..5b3a72916c 100644 --- a/inst/examples/01_hello/app.R +++ b/inst/examples/01_hello/app.R @@ -1,34 +1,24 @@ +library(bslib) library(shiny) # Define UI for app that draws a histogram ---- -ui <- fluidPage( +ui <- page_sidebar( - # App title ---- - titlePanel("Hello Shiny!"), - - # Sidebar layout with input and output definitions ---- - sidebarLayout( + # Output: Histogram ---- + plotOutput(outputId = "distPlot"), - # Sidebar panel for inputs ---- - sidebarPanel( - - # Input: Slider for the number of bins ---- + # Sidebar panel for inputs ---- + sidebar = sidebar( + # Input: Slider for the number of bins ---- sliderInput(inputId = "bins", label = "Number of bins:", min = 1, max = 50, value = 30) + ), - ), - - # Main panel for displaying outputs ---- - mainPanel( - - # Output: Histogram ---- - plotOutput(outputId = "distPlot") - - ) - ) + # App title ---- + title = "Hello Shiny!" ) # Define server logic required to draw a histogram ----