Comments (6)
As this is not a {shinydashboard} issue I guess you are better off asking those questions here:
https://stackoverflow.com/questions/tagged/shiny
or here:
https://community.rstudio.com/c/shiny/8
but nevertheless, there you go:
library(shiny)
library(shinydashboard)
library(shinydashboardPlus)
shinyApp(
ui = dashboardPage(
header = dashboardHeader(),
sidebar = dashboardSidebar(),
body = dashboardBody(),
footer = dashboardFooter(
# with image
left = a(target="_blank", href = 'https://www.google.com/',
img(src = 'https://www.gstatic.com/images/branding/googlelogo/svg/googlelogo_clr_74x24px.svg', title = "visit google.com", height = "40px"),
style = "padding-top:5px; padding-bottom:5px;"),
# witout image:
# left = a("Please look at the lower right corner", target="_blank", href = 'https://www.google.com/',
# style = "padding-top:5px; padding-bottom:5px;"),
right = textOutput("somethinguseful")
),
title = "DashboardPage"
),
server = function(input, output, session) {
output$somethinguseful <- renderText({
invalidateLater(500)
as.character(Sys.time())
})
}
)
from shinydashboard.
You might want to check shinydashboardPlus::dashboardFooter.
from shinydashboard.
You might want to check shinydashboardPlus::dashboardFooter.
Hi friend,
Thanks for your kind reply!
I also found this function before, shinydashboardPlus has very good example here, which is exactly what I want. But from this dashboardFooter tutorial, I can only add some simple text at the footer. I still don't know how to put the link behind the text and build a dynamic footer.
Is there any other advanced tutorials about this? Thanks.
Best regards,
Birong
from shinydashboard.
You are not limited to using text regarding those parameters. Please check the following:
library(shiny)
library(shinydashboard)
library(shinydashboardPlus)
shinyApp(
ui = dashboardPage(
header = dashboardHeader(),
sidebar = dashboardSidebar(),
body = dashboardBody(),
footer = dashboardFooter(
left = uiOutput("htmlout"),
right = textOutput("somethinguseful")
),
title = "DashboardPage"
),
server = function(input, output, session) {
output$htmlout <- renderUI({
strong("Please look at the lower right corner")
})
output$somethinguseful <- renderText({
invalidateLater(500)
as.character(Sys.time())
})
}
)
PS: of course you could also directly use an img
tag instead of renderUI
.
from shinydashboard.
Hi friend,
Thanks for your reply! It helps a lot!
I was wondering if you could show me how to put a link behind "Please look at the lower right corner". For example, I click on "Please look at the lower right corner", and then shiny can open a website page for me. That would be great!
Sorry for being so annoying. Thanks.
from shinydashboard.
As this is not a {shinydashboard} issue I guess you are better off asking those questions here:
https://stackoverflow.com/questions/tagged/shiny
or here:
https://community.rstudio.com/c/shiny/8
but nevertheless, there you go:
library(shiny) library(shinydashboard) library(shinydashboardPlus) shinyApp( ui = dashboardPage( header = dashboardHeader(), sidebar = dashboardSidebar(), body = dashboardBody(), footer = dashboardFooter( # with image left = a(target="_blank", href = 'https://www.google.com/', img(src = 'https://www.gstatic.com/images/branding/googlelogo/svg/googlelogo_clr_74x24px.svg', title = "visit google.com", height = "40px"), style = "padding-top:5px; padding-bottom:5px;"), # witout image: # left = a("Please look at the lower right corner", target="_blank", href = 'https://www.google.com/', # style = "padding-top:5px; padding-bottom:5px;"), right = textOutput("somethinguseful") ), title = "DashboardPage" ), server = function(input, output, session) { output$somethinguseful <- renderText({ invalidateLater(500) as.character(Sys.time()) }) } )
Many thanks! 👍
from shinydashboard.
Related Issues (20)
- Dashboard sidebar starts uncollapsed HOT 2
- SidebarMenu menuItem href elements contain the aria-selected tag HOT 1
- can not see my second tabitem after clicking action button HOT 1
- Error with publication of a Shiny App with R
- [Update request] The default icon for menuSubItem() "angle-double-right" is now "angles-right" in Font Awesome 6.0.0 HOT 5
- FYI copyright on the shinydashboard website HOT 1
- dashboardPage shouldn't create <title> HTML tags if title = NULL HOT 1
- dashboardBody not showing when conditionalPanel is used HOT 1
- Toggling boxes to collapse has unexpected results with nested boxes HOT 1
- ShinyDash fails to render since R4.3 added to computer. HOT 3
- `shinydashboard::updateTabItems` not matching `shiny::updateTabsetPanel` HOT 2
- Why use unsecure AdminLTE? HOT 4
- Remove/hide footer from dashboard HOT 3
- Collapsible box not responding in my navbarPage Rshiny
- shinydashboard - "Get started" Tab [1 Link + 1 Typo] HOT 1
- shinydashboard - "Appearance" Tab [1 Punctuation]
- shinydashboard - "Behavior" Tab [1 Typo]
- I am using the R Package shinydashboard, now the dashboardSidebar is NOT showing in black background HOT 8
- `updateTabItems` not working when selecting dynamically rendered `menuSubItem` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shinydashboard.