Title: | A Zero Dependency 'SVG' Icon Library for 'Shiny' |
---|---|
Description: | An implementation of the 'Heroicons' icon library for 'shiny' applications and other 'R' web-based projects. You can search, render, and customize icons without 'CSS' or 'JavaScript' dependencies. |
Authors: | David Ruvolo [aut, cre] , Adam Wathan [ctb, cph] (Author of heroicons library), Steve Schoger [ctb, cph] (Author of heroicons library) |
Maintainer: | David Ruvolo <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.0 |
Built: | 2024-09-27 05:45:17 UTC |
Source: | https://github.com/davidruvolo51/rheroicons |
You can search for icons by querying the icon set. For example, if you would like to find icons that are arrows and chevrons, then type in you query as a regexp: 'arrows|chevrons'. Alternatively, if you would like to view all icon names, leave the value for 'query' blank.
find_icons(query = ".")
find_icons(query = ".")
query |
a string containing a search term |
An array of icon names
https://heroicons.com https://github.com/tailwindlabs/heroicons
find_icons(query = "chevron") find_icons(query = "chevron|arrow") find_icons(query = "down|up|left|right") find_icons(query = "-circle") find_icons(query = "(-down)$")
find_icons(query = "chevron") find_icons(query = "chevron|arrow") find_icons(query = "down|up|left|right") find_icons(query = "-circle") find_icons(query = "(-down)$")
Run the gallery to view and search for icons. Click on an icon name to copy the 'R' code to the clipboard.
launch_gallery(...)
launch_gallery(...)
... |
additional 'shiny' options |
A 'shiny' app containing the icon gallery
if (interactive()) { rheroicons::launch_gallery() }
if (interactive()) { rheroicons::launch_gallery() }
Render an icon by name. Run 'launch_gallery' to view all available icons or search for icons using the 'find_icons' function.
rheroicon(name = NULL, type = "outline", class = NULL)
rheroicon(name = NULL, type = "outline", class = NULL)
name |
string containing the name of an icon |
type |
render icon by style; either 'solid', 'outline', or 'mini' (default: 'outline') |
class |
a string containing one or more 'CSS' classes (optional) |
An string containing the 'SVG' markup of an icon
Icons are rendered from 'SVG' strings. All icons have three 'CSS' classes defined: global, icon style, and icon name.
All icons are returned with the 'CSS' class 'rheroicons'
All icons have a solid and an outlined version. The icon style 'CSS' class is determined by the value entered for 'type'. Icons can have 'rheroicons-outline', 'rheroicons-solid', or 'rheroicons-mini'.
The icon name is also passed into the list of 'CSS' class. These are always structured in the following format: 'rheroicons-icon'. If the icon is 'hand-thumb-down', the 'CSS' class would be 'rheroicons-hand-thumb-down'.
Use any of combination of these classes to style icons via 'CSS'. In addition, you apply your own 'CSS' classes using the 'class' argument.
https://heroicons.com https://github.com/tailwindlabs/heroicons
rheroicon(name = "face-smile") rheroicon(name = "face-smile", type = "solid") rheroicon(name = "face-smile", class = "my-icon-set")
rheroicon(name = "face-smile") rheroicon(name = "face-smile", type = "solid") rheroicon(name = "face-smile", class = "my-icon-set")