代码之家  ›  专栏  ›  技术社区  ›  ishkeesh12

将shiny\u iconLink和checkboxInput放在shiny中的同一行上

  •  0
  • ishkeesh12  · 技术社区  · 6 年前

    我试图将一个带有模态的shiny\u iconlink()与checkboxInput放在同一行上。我一直在摆弄div类和id,但似乎什么都没用。

    fluidRow(
      column(width = 4,
             span(id="icon", shiny_iconlink()),
             checkboxInput("checkbox", "get me inline"),
             bsModal("modal", "title", "icon", "content")
            )
    )
    1 回复  |  直到 6 年前
        1
  •  0
  •   Hallie Swan    6 年前

    正如@SBista所建议的,您可以使用 fluidRow column . This article 关于闪亮的应用程序布局很有帮助,特别是 fluid grid system .

    试试这个:

    library(shiny)
    library(bsplus)    
    library(shinyBS)
    
    ui <- fluidPage(
        fluidRow(
            column(width = 1,
                   span(id="icon", shiny_iconlink())),
            column(width = 2,
                   checkboxInput("checkbox", "get me inline"),
                   bsModal("modal", "title", "icon", "content")
            )
        )
    )
    
    server <- function(input, output, session) {
    
    }
    
    shinyApp(ui, server)