fieldset: Group and label multiple inputs

View source: R/components.R

fieldsetR Documentation

Group and label multiple inputs

Description

Use fieldset to associate and label inputs. This is good for screen readers and other assistive technologies.

Usage

fieldset(..., legend = NULL)

Arguments

...

Any number of inputs to group or named arguments passed as HTML attributes to the parent element.

legend

A character string specifying the fieldset's legend.

See Also

Other layout functions: column(), navbar(), webpage()

Examples


### Grouping related inputs

fieldset(
  legend = "Pizza order",
  formGroup(
    "What toppings would you like?",
    div(
      checkbarInput(
        id = "toppings",
        choices = c(
          "Cheese",
          "Black olives",
          "Mushrooms"
        )
      )
    )
  ),
  formGroup(
    "Is this for delivery?",
    checkboxInput(
      id = "deliver",
      choice = "Deliver"
    )
  ),
  buttonInput(
    .style %>% background("primary"),
    id = "order",
    label = "Place order"
  )
)


nteetor/yonder documentation built on June 8, 2022, 1:36 p.m.