View source: R/shiny-flex-div.R
flex_div | R Documentation |
Generate Shiny element with arrangement automatically
flex_div(..., ncols = "auto")
... |
shiny UI elements |
ncols |
number of columns, either |
If multiple numbers of columns are specified,
flex_div
will guess the best size that will be applied.
For button UI, flex_div
automatically add "20px"
on the top margin.
HTML objects
ui <- flex_div(
shiny::selectInput('sel', label = 'Select input',
choices = '', width = '100%'),
shiny::textInput('id2', label = html_asis(' '), width = '100%',
value = 'Heights aligned'),
actionButtonStyled('ok2', 'Button', width = '100%',),
shiny::sliderInput('sl', 'Item 4', min = 1, max = 2,
value = 1.5, width = '100%'),
shiny::fileInput('aa', 'item 5', width = '100%'),
ncols = c(2,3) # Try to assign 2 or 3 items per column
)
if(interactive()){
shiny::shinyApp(ui = shiny::fluidPage(shiny::fluidRow(ui)),
server = function(input, output, session){})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.