navInput | R Documentation |
A reactive input styled as a navigation control. The navigation input can be
styled as links, tabs, or pills. A nav input is paired with navContent()
and showNavPane()
to create tabbed user interfaces. Observers and reactives
are triggered when a nav choice or menu item is clicked. The reactive value
of a nav input is NULL
or a singleton character string. The value of any
menus in the nav input must be retrieved with its own reactive id.
navInput(
...,
id,
choices = NULL,
values = choices,
selected = values[[1]],
appearance = "links",
fill = FALSE
)
updateNavInput(
id,
choices = NULL,
values = choices,
selected = NULL,
enable = NULL,
disable = NULL,
session = getDefaultReactiveDomain()
)
... |
Additional named arguments passed as HTML attributes to the parent element or tag elements passed as child elements to the parent element. |
id |
A character string specifying the id of the reactive input. |
choices |
A character vector or list of tag elements specifying the navigation items of the input. |
values |
A character vector specifying the values of the input's
choices, defaults to |
selected |
One of |
appearance |
One of |
fill |
One of |
enable |
One of |
disable |
One of |
session |
A reactive context, defaults to |
navInput( id = "tabs1", choices = c( "Tab 1", "Tab 2", "Tab 3" ), selected = "Tab 1", appearance = "tabs" )
navInput( id = "tabs2", choices = paste("Tab", 1:3), selected = "Tab 1", appearance = "pills" )
navInput( id = "tabs3", choices = list( "Tab 1", menuInput( id = "menu1", label = "Tab 2", choices = c( "Action", "Another action" ) ), "Tab 2" ), values = c("tab1", "tab2", "tab3") )
navInput( id = "tabs4", choices = paste("Tab", 1:5), values = paste0("tab", 1:5), appearance = "pills", fill = TRUE )
navInput( .style %>% flex(justify = "center"), id = NULL, choices = c("Tab 1", "Tab 2", "Tab 3") )
Other inputs:
buttonGroupInput()
,
buttonInput()
,
checkbarInput()
,
checkboxInput()
,
chipInput()
,
fileInput()
,
formInput()
,
listGroupInput()
,
menuInput()
,
radioInput()
,
radiobarInput()
,
rangeInput()
,
selectInput()
,
textInput()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.