闪亮的主题没有踢
shinythemes not kicking in
我正在使用 shinythemes 库并创建一个主题为 "united"
的 UI
出于某种原因,我看不到这个主题应用于我的 Shiny UI,下面是我的 UI 代码。
ui = shinyUI(fluidPage(theme=shinytheme("united"),
title = 'Research Productivity',
tabsetPanel(
tabPanel("Test",
fluidRow(
column(width = 2,
h4("Functions"),
wellPanel(
#radioButtons("editingCol0", "Rownames editing", choices = c("Enable" = TRUE, "Disable" = FALSE), selected = FALSE)
)
),
column(width = 12,
h4("test_data1"),
d3tfOutput('test_data1', height = "auto")
)
# ),
# column(width = 5,
#
# h4("test_data1 after filtering and editing"),
# tableOutput("filteredtest_data1")
# ) # column
)) # fluidRow
)))
非常感谢任何有关解决此问题的反馈。
您的主题确实有效。但是,您使用的是 fluidPage
,因此在添加更多组件之前不一定会 看到 主题元素。
如果您想更清楚地看到它的实际效果,您可以使用 navbarPage
library(shiny)
library(shinythemes)
shinyApp(ui = navbarPage(theme=shinytheme("united"),
title = 'Research Productivity',
tabsetPanel(
tabPanel("Test",
fluidRow(
column(width = 2,
h4("Functions")),
column(width = 12,
actionButton(inputId = "btn", label = "button"))
)
) # fluidRow
)
),
server = function(input, output){ }
)
我正在使用 shinythemes 库并创建一个主题为 "united"
的 UI出于某种原因,我看不到这个主题应用于我的 Shiny UI,下面是我的 UI 代码。
ui = shinyUI(fluidPage(theme=shinytheme("united"),
title = 'Research Productivity',
tabsetPanel(
tabPanel("Test",
fluidRow(
column(width = 2,
h4("Functions"),
wellPanel(
#radioButtons("editingCol0", "Rownames editing", choices = c("Enable" = TRUE, "Disable" = FALSE), selected = FALSE)
)
),
column(width = 12,
h4("test_data1"),
d3tfOutput('test_data1', height = "auto")
)
# ),
# column(width = 5,
#
# h4("test_data1 after filtering and editing"),
# tableOutput("filteredtest_data1")
# ) # column
)) # fluidRow
)))
非常感谢任何有关解决此问题的反馈。
您的主题确实有效。但是,您使用的是 fluidPage
,因此在添加更多组件之前不一定会 看到 主题元素。
如果您想更清楚地看到它的实际效果,您可以使用 navbarPage
library(shiny)
library(shinythemes)
shinyApp(ui = navbarPage(theme=shinytheme("united"),
title = 'Research Productivity',
tabsetPanel(
tabPanel("Test",
fluidRow(
column(width = 2,
h4("Functions")),
column(width = 12,
actionButton(inputId = "btn", label = "button"))
)
) # fluidRow
)
),
server = function(input, output){ }
)