Description Usage Arguments Examples
Show a tabler_dropdown on the client
1 | show_tabler_dropdown(id, session = getDefaultReactiveDomain())
|
id |
Dropdown id. |
session |
Shiny session |
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 39 40 41 42 43 44 | if (interactive()) {
ui <- tabler_page(
tabler_navbar(
brand_url = "https://preview-dev.tabler.io",
brand_image = "https://preview-dev.tabler.io/static/logo.svg",
nav_menu = NULL,
tabler_dropdown(
id = "mydropdown",
title = "Dropdown",
subtitle = "click me",
tabler_dropdown_item(
id = "item1",
"Show Notification"
),
tabler_dropdown_item(
"Do nothing"
)
)
),
tabler_body(
tabler_button("show", "Open dropdown", width = "25%"),
footer = tabler_footer(
left = "Rstats, 2020",
right = a(href = "https://www.google.com")
)
)
)
server <- function(input, output, session) {
observeEvent(input$show, {
show_tabler_dropdown("mydropdown")
})
observeEvent(input$item1, {
showNotification(
"Success",
type = "message",
duration = 2,
)
})
}
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.