Description Usage Arguments Author(s) Examples
Create a sidebarLayout similar to the original sidebarLayout in shiny
1 | UIkitSidebarLayout(sidebarPanel, mainPanel)
|
sidebarPanel |
Slots for the UIkitSidebar. |
mainPanel |
Slot for UIkitSidebarTrigger and the content of your app. |
David Granjon, dgranjon@ymail.com
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 29 30 31 32 33 34 | if(interactive()){
library(shiny)
shiny::shinyApp(
ui = UIkitPage(
title = "My UIkit application",
UIkitSidebarLayout(
mainPanel = UIkitGrid(
plotOutput("plot"),
UIkitSidebarTrigger(id = "mysidebar")
),
sidebarPanel = UIkitSidebar(
id = "mysidebar",
tagList(
h3("Test Sidebar"),
"Lorem ipsum dolor sit amet, consectetur adipiscing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat.",
sliderInput("obs", "Number of observations:",
min = 0, max = 1000, value = 500
)
)
)
)
),
server = function(input, output) {
output$plot <- renderPlot({
hist(rnorm(input$obs))
})
}
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.