chakraCheckboxWithChildren {shinyChakraUI} | R Documentation |
A widget with a parent checkbox and child checkboxes.
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
.
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)
}