horizontal_menu | R Documentation |
Renders UI with horizontal menu
horizontal_menu(menu_items, active_location = "", logo = NULL)
menu_items |
list with list that can have fields: "name" (mandatory), "link" and "icon" |
active_location |
active location of the menu (should match one from "link") |
logo |
optional argument that displays logo on the left of horizontal menu, can be character with image location, or shiny image object |
shiny div with horizontal menu
library(shiny.semantic)
menu_content <- list(
list(name = "AA", link = "http://example.com", icon = "dog"),
list(name = "BB", link = "#", icon="cat"),
list(name = "CC")
)
if (interactive()){
ui <- semanticPage(
horizontal_menu(menu_content)
)
server <- function(input, output, session) {}
shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.