Skip to contents
  • flucol(): Shiny Fluid Row + Column Layout

  • icon_text(): Icon Text

Create a fluid row with multiple columns. This function is a wrapper around shiny::fluidRow() and shiny::column(). It allows for the creation of multiple columns with varying widths and offsets, or just as a shorthand for shiny::fluidRow(shiny::column(width = 12, ...)).

Create a <span> tag containing an icon and text. Useful for displaying icons next to text, typically for labels and titles.

Usage

flucol(..., width = 12, offset = 0)

icon_text(icon, text)

Arguments

...

Elements to include within the columns. These can be any valid HTML tags or Shiny UI elements.

width

Integer for the width to use for the column

offset

Integer for the offset to use for the column

icon

Either a character string representing a shiny icon or a shiny icon tag created with shiny::icon(). If a character string is provided, it will be converted to a shiny icon tag.

text

Character string to display next to the provided icon.

Value

  • flucol(): Returns a shiny::fluidRow() wrapping a shiny::column() containing the provided UI elements

  • icon_text(): Returns a <span> tag containing the provided icon and text.

Returns a shiny::fluidRow() wrapping a shiny::column() containing the provided UI elements

Returns a <span> tag containing the provided icon and text.

Details

These functions provide utility functions for working with HTML and Shiny UI elements. They are designed to simplify the creation of common UI elements and layouts.

Examples

flucol(
  htmltools::tags$h1("Hello World!")
)
#> <div class="row">
#>   <div class="col-sm-12">
#>     <h1>Hello World!</h1>
#>   </div>
#> </div>
# provide plain text icon
icon_text("table", "Table") |> htmltools::browsable()

  
  Table

# provide shiny icon tag
icon_text(shiny::icon("table"), "Table") |> htmltools::browsable()

  
  Table