chakraCheckboxWithChildren {shinyChakraUI}R Documentation

Checkbox with child checkboxes

Description

A widget with a parent checkbox and child checkboxes.

Usage

chakraCheckboxWithChildren(
  inputId,
  parentCheckbox,
  ...,
  stackAttributes = list(pl = 6, mt = 1, spacing = 1)
)

Arguments

inputId

widget id

parentCheckbox

the parent checkbox

...

the child checkboxes

stackAttributes

list of attributes which control the layout

Value

A widget to use in chakraComponent.

Examples

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)
}

[Package shinyChakraUI version 1.1.1 Index]