Description Usage Arguments Examples
Form groups are a way of labeling an input. Form rows are similar to
columns()
s, but include additional styles intended for forms. The
flexibility provided by form rows and groups means you can confidently
develop shiny applications for devices and screens of varying sizes.
1 2 3 |
label |
A character string specifying a label for the input or |
input |
A tag element specifying the input to label. |
... |
For formGroup, additional named arguments passed as HTML attributes to the parent element. For formRow, any number of |
help |
A character string specifying help text for the input, defaults
to |
width |
A responsive argument. One of |
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 28 29 30 31 32 33 34 35 36 37 38 | ### Grid layout forms
# Use responsive arguments to adjust form layouts based on viewport size.
# Be sure to adjust the size of your browser window between large and small.
card(
formRow(
formGroup(
width = c(md = 6), # <-
label = "Username",
textInput(
id = "user"
)
),
formGroup(
width = c(md = 6), # <-
label = "Password",
textInput(
type = "password",
id = "pass"
)
)
),
formGroup(
label = "Username",
groupTextInput(
id = "username",
left = "@"
)
),
buttonInput(
id = "go",
label = "Go!"
) %>%
background("blue")
) %>%
margin(3) %>%
background("grey")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.