Description Usage Arguments Value Examples
View source: R/chakraCheckboxWithChildren.R
A widget with a parent checkbox and child checkboxes.
1 2 3 4 5 6 | chakraCheckboxWithChildren(
inputId,
parentCheckbox,
...,
stackAttributes = list(pl = 6, mt = 1, spacing = 1)
)
|
inputId |
widget id |
parentCheckbox |
the parent checkbox |
... |
the child checkboxes |
stackAttributes |
list of attributes which control the layout |
A widget to use in chakraComponent
.
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 35 36 37 38 39 | library(shiny)
library(shinyChakraUI)
ui <- chakraPage(
br(),
chakraComponent(
"mycomponent",
chakraCheckboxWithChildren(
"cwc",
Tag$Checkbox(
"Parent checkbox"
),
Tag$Checkbox(
"Child checkbox 1"
),
Tag$Checkbox(
defaultChecked = TRUE,
"Child checkbox 2"
)
)
)
)
server <- function(input, output, session){
observe({
print(input[["cwc"]])
})
}
if(interactive()){
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.