dropdown | R Documentation |
Dropdown menus are a container for buttons, text, and form inputs. See
argument ...
for details on composing dropdown menus.
dropdown(label, ..., direction = "down", align = "left")
label |
A character string specifying the label of the dropdown's button. |
... |
Character strings or vectors, header tag elements, button inputs,
or form inputs specifying the elements of the dropdown. These elements may
be grouped into lists to create a menu with sections. Additional named arguments are passed as HTML attributes to the parent element. |
direction |
One of |
align |
One of |
In some cases a menuInput()
isn’t enough and you will want to build a
more complex dropdown menu.
To recreate a menut input.
dropdown( label = "Choices", buttonInput(id = "choice1", label = "Choice 1"), buttonInput(id = "choice2", label = "Choice 2"), buttonInput(id = "choice3", label = "Choice 3") )
dropdown( label = "Choices", linkInput(id = "link1", label = "Choice 1"), linkInput(id = "link2", label = "Choice 2") )
dropdown( label = "Sections", h6("Section 1"), buttonInput(id = "a", label = "Option A"), buttonInput(id = "b", label = "Option B"), hr(), h6("Section 2"), buttonInput(id = "c", label = "Option C"), buttonInput(id = "d", label = "Option D") )
dropdown( label = "Up!", direction = "up", buttonInput(id = "up1", label = "Choice 1"), buttonInput(id = "up2", label = "Choice 2") )
dropdown( label = "Sign in", formInput( id = "login", formGroup( label = "Username / Email", textInput( type = "email", id = "user" ) ), formGroup( label = "Password", textInput( type = "password", id = "pass" ) ), formSubmit( label = "Sign in", value = "signin" ) ) %>% padding(3, 4, 3, 4) )
Other components:
alert()
,
badge()
,
blockquote()
,
card()
,
collapsePane()
,
d1()
,
img()
,
jumbotron()
,
modal()
,
navContent()
,
popover()
,
pre()
,
toast()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.