fieldset: Group and label multiple inputs

Description Usage Arguments See Also Examples

View source: R/components.R

Description

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

Usage

1

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(), flex(), navbar(), responsive, webpage()

Examples

 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
### 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("order", "Place order") %>%
    background("blue")
)

yonder documentation built on Jan. 11, 2020, 9:35 a.m.