Title: | Easily Work with 'Bootstrap' Icons |
---|---|
Description: | Easily use 'Bootstrap' icons inside 'Shiny' apps and 'R Markdown' documents. More generally, icons can be inserted in any 'htmltools' document through inline 'SVG'. |
Authors: | Carson Sievert [cre, aut] , Posit Software, PBC [cph, fnd], Mark Otto [cph] (Bootstrap icons maintainer) |
Maintainer: | Carson Sievert <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.2.9000 |
Built: | 2024-11-08 03:57:08 UTC |
Source: | https://github.com/rstudio/bsicons |
Use Bootstrap icons (as inline SVG)
bs_icon( name, size = "1em", class = NULL, title = NULL, a11y = c("auto", "deco", "sem", "none"), ... )
bs_icon( name, size = "1em", class = NULL, title = NULL, a11y = c("auto", "deco", "sem", "none"), ... )
name |
The name of the Bootstrap icon. Whitespace is replaced with |
size |
Any valid CSS unit defining both the height and width of the icon. |
class |
Additional CSS classes to add to the |
title |
If provided (highly recommended), |
a11y |
Cases that distinguish the role of the icon and inform which
accessibility attributes to be used. Icons can either be |
... |
additional CSS properties (e.g., |
An htmltools::HTML()
string containing the SVG icon.
up <- bs_icon("arrow-up-circle", size = "9em", class = "text-success") up_fill <- bs_icon("arrow-up-circle-fill", size = "9em", class = "text-success") # utility class will only apply with a modern version of Bootstrap if (interactive() && requireNamespace('bslib')) { bslib::page_fluid(up, up_fill) }
up <- bs_icon("arrow-up-circle", size = "9em", class = "text-success") up_fill <- bs_icon("arrow-up-circle-fill", size = "9em", class = "text-success") # utility class will only apply with a modern version of Bootstrap if (interactive() && requireNamespace('bslib')) { bslib::page_fluid(up, up_fill) }