Description Usage Arguments Examples
Display a badge in your favicon (displayed in the tab of a browser).
1 2 3 4 5 6 7 8 9 10 11 |
value |
Number to display on favicon. |
animation |
Animation to use : pop, slide, fade, popFade or none. |
position |
Position : ip, down, left or upleft. |
type |
Shape : circle or rectangle. |
bgColor |
Background color. |
textColor |
Text color. |
session |
Shiny session. |
img |
Path to an image (file should be located in www folder). Default is to used Shiny logo. |
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 | if (interactive()) {
library(shiny)
ui <- fluidPage(
use_favico(),
actionButton("minus", "-1"),
actionButton("plus", "+1")
)
server <- function(input, output, session) {
value <- reactiveVal(0)
observeEvent(input$minus, {
newValue <- value() - 1
value(newValue)
})
observeEvent(input$plus, {
newValue <- value() + 1
value(newValue)
})
observeEvent(value(), {
favico(value())
})
}
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.