我已经用shinydashboard做了一个仪表板,真的很喜欢用这个包做一个布局的简易性!但是,我想使用shinythemes包中的一个主题。我对shinydashboard皮肤很熟悉,但它们远不如shinythemes那么酷或现代。shinythemes似乎可以很好地使用shiny,但不能使用shinydashboard。
有谁知道如何使用shinydashboard来使用shinythemes?
非常感谢!
即:仪表板开始:不工作:
ui <- dashboardPage( theme = shinytheme("spacelab"),
dashboardHeader(title = "I want this to look awesome!"),
dashboardSidebar(sidebarMenu(发布于 2018-03-12 00:43:23
有一个允许修改shinydashboard主题的包(dashboardthemes)。它的使用相当简单。
可用的皮肤之一:

或者,如果你想尝试一些新的皮肤,可以去semantic.dashboard,它提供了Bootswatch和语义UI主题。
发布于 2017-04-25 03:35:47
不幸的是,shinydashboard不能像上面那样切换到其他基于Bootstrap的主题。
如果您需要在您的应用程序中应用自定义.css,我将执行以下操作:
dashboardBody(
useShinyjs(),
tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "css/custom.css"),
tags$link(rel = 'stylesheet', href = '//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css')
),
# Source add'l UI elements:
tabItems(
source('ui/charts.R', local = TRUE)[['value']], # source: https://groups.google.com/forum/#!topic/shiny-discuss/kRBT8EmNsJg
source('ui/help.R', local = TRUE)[['value']]
)
)其中,custom.css (或类似的)是定义被覆盖的UI元素的地方。
发布于 2017-05-08 23:37:33
如果只是你想要改变的配色方案,请参考这篇文章:
How to change color in shiny dashboard?
您还可以在headers部分更改字体,并将其链接回google字体:
tags$head(tags$style(HTML("@import url('https://fonts.googleapis.com/css?family=News+Cycle');
h1 {
font-family:'News Cycle',sans-serif;
font-size: 48px;
font-weight: 1000;
line-height: 1.1;
color: 'slategrey';
}")))https://stackoverflow.com/questions/41774004
复制相似问题