Getting started

Checkbars will expand to fill the width of their parent element.

checkbarInput(
  .style %>%
    background("secondary"),
  id = NULL,
  choices = c("Choice 1", "Choice 2", "Choice 3")
)

If you want to adjust the width you can use the width() utility.

checkbarInput(
  .style %>%
    background("secondary") %>%
    width(50),  # <-
  id = NULL,
  choices = c("Choice 1", "Choice 2", "Choice 3")
)

Background color

Like other inputs, checkbar inputs apply modified background styles

checkbarInput(
  .style %>%
    background("info"),
  id = NULL,
  choices = c("Choice 1", "Choice 2")
)

Labelling

Use a formGroup() to add a label or help text to checkbar input.

formGroup(
  label = "Label",  # <-
  checkbarInput(
    .style %>%
      border("dark") %>%
      font("light"),
    id = NULL,
    choices = c("Choice 1", "Choice 2")
  ),
  help = "Help text about the input"
)


nteetor/dull documentation built on June 10, 2022, 11:30 a.m.