我有一個閃亮的應用程序,它的下載按鈕和操作按鈕是分開的:
以下是可重現的代碼:
library(shiny)
ui <- fluidPage(
titlePanel("Minimal App"),
hr(),
sidebarLayout(
sidebarPanel(
"Placeholder"
),
mainPanel("Placeholder",
br(),
fluidRow("Placeholder"),
fluidRow(
column(2, downloadButton("download")),
column(1, actionButton("send_email", "Email", icon = icon("inbox")))
)
)
)
)
server <- function(input, output, session) {}
shinyApp(ui, server)
如何最小化& quot下載& quot按鈕和& quot電子郵件& quot按鈕?我想讓它們之間的空間更近,但不是零像素。YouTube按鈕就是一個很好的例子:
您可以使用splitLayout:
mainPanel("Placeholder",
br(),
fluidRow("Placeholder"),
fluidRow(
column(
3,
splitLayout(
downloadButton("download"),
actionButton("send_email", "Email", icon = icon("inbox"))
)
)
)
)