bslib icon indicating copy to clipboard operation
bslib copied to clipboard

Set `card_header()` to `display:flex` by default

Open cpsievert opened this issue 1 year ago • 0 comments

Currently, implementing a layout like the one below is a little tricky and would be easier if it was flex by default...all you'd have to know is add a margin-left: auto to the 1st item that you want to be right aligned

card(
    card_header(
      "Penguin body mass",
      tooltip(
        bsicons::bs_icon("question-circle"),
        "Mass measured in grams.",
        placement = "right"
      ),
      popover(
        bsicons::bs_icon("gear", class = "ms-auto"),
        selectInput("yvar", "Split by", c("sex", "species", "island")),
        selectInput("color", "Color by", c("species", "island", "sex"), "island"),
        title = "Plot settings"
      ),
      class = "d-flex align-items-center gap-1"
    ),
    plotOutput("plt")
)
Screenshot 2023-08-04 at 3 45 00 PM

cpsievert avatar Aug 04 '23 20:08 cpsievert