https://github.com/johncoene/shinytitle
Dynamically update shiny page title
https://github.com/johncoene/shinytitle
r rstats shiny
Last synced: 14 days ago
JSON representation
Dynamically update shiny page title
- Host: GitHub
- URL: https://github.com/johncoene/shinytitle
- Owner: JohnCoene
- License: other
- Created: 2020-01-21T09:17:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-22T12:51:35.000Z (over 5 years ago)
- Last Synced: 2025-04-12T00:42:56.028Z (14 days ago)
- Topics: r, rstats, shiny
- Language: JavaScript
- Homepage:
- Size: 179 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shinytitle
{shinytitle} updates the page title based on the active tab in `shiny::navbarPage`.
## Example
Place `shinytitle::use_shinytitle()` in the footer.
```r
library(shiny)ui <- navbarPage(
"Shinytitle", # base title
tabPanel(
"Home",
h2("Tab 1")
),
tabPanel(
"A second tab",
h2("Tab 2")
),
tabPanel(
"Another tab",
h2("Tab 3")
),
footer = list(
# update page title
shinytitle::use_shinytitle()
)
)server <- function(input, output){
}
shinyApp(ui, server)
```
## Get it
You can install shinytitle from Github with:
```r
# install.packages("remotes")
remotes::install_github("JohnCoene/shinytitle")
```