How to display checkboxGroupInput
horizontally (inline block) with R shiny?
You can do like this :
checkboxGroupInput(inputId="test", label="Test", choices=1:4),
tags$style(type="text/css", HTML("#test>*{float: left; margin-right: 15px; height: 20px;} #test {height: 20px;}"))
Or directly edit a css
file, see https://groups.google.com/forum/#!topic/shiny-discuss/EMQV8NbA3MI
EDIT
Since shiny 0.10.0
, you can use the inline
argument for horizontal layout :
library("shiny")
ui <- fluidPage(
checkboxGroupInput(inputId="test", label="Test", choices=1:4, inline = TRUE)
)
server <- function(input, output) {
}
shinyApp(ui = ui, server = server)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With