Description Usage Arguments Value Examples
View source: R/input-materialswitch.R
Create buttons grouped that act like radio buttons.
1 2 |
inputId |
The |
label |
Input label. |
value |
TRUE or FALSE. |
status |
Color of the switch |
right |
Should the the label be on the right ? default to FALSE |
width |
Width of the container |
A switch control that can be added to a UI definition.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | materialSwitch(inputId = "somevalue", label = "")
## Not run:
## Only run examples in interactive R sessions
if (interactive()) {
ui <- fluidPage(
materialSwitch(inputId = "somevalue", label = ""),
verbatimTextOutput("value")
)
server <- function(input, output) {
output$value <- renderText({ input$somevalue })
}
shinyApp(ui, server)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.