https://github.com/JohnCoene/shinytitle
Dynamically update shiny page title
https://github.com/JohnCoene/shinytitle
r rstats shiny
Last synced: 5 months 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 (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-22T12:51:35.000Z (about 5 years ago)
- Last Synced: 2024-11-25T11:09:55.161Z (5 months ago)
- Topics: r, rstats, shiny
- Language: JavaScript
- Homepage:
- Size: 179 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - JohnCoene/shinytitle - Dynamically update shiny page title (JavaScript)
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")
```