# NOT RUN {
### Simple options w/ buttons
dropdown(
label = "Choices",
buttonInput("choice1", "Choice 1"),
buttonInput("choice2", "Choice 2"),
buttonInput("choice3", "Choice 3")
)
### Grouped sections
dropdown(
label = "Sections",
list(
h6("Section 1"),
buttonInput("addA", "Add A"),
buttonInput("addB", "Add B")
),
list(
h6("Section 2"),
buttonInput("calcC", "Calculate C"),
buttonInput("calcD", "Calculate D")
)
)
### Direction variations
div(
lapply(
c("up", "down", "left", "right"),
function(d) {
dropdown(
label = d,
direction = d,
buttonInput(NULL, "Nam euismod"),
buttonInput(NULL, "Nunc eleifend"),
buttonInput(NULL, "Nullam eu")
) %>%
margin(3)
}
)
) %>%
display("flex")
### Include forms
dropdown(
label = "Sign in",
formInput(
id = "login",
formGroup(
label = "Email address",
textInput(
id = "email",
placeholder = "email@example.com"
)
),
formGroup(
label = "Password",
passwordInput(
id = "password",
placeholder = "*****"
)
),
submit = submitInput(
label = "Sign in"
)
) %>%
padding(3, 4, 3, 4)
)
# }
Run the code above in your browser using DataLab