Skip to contents

shadshiny ships a small, curated icon set drawn from Lucide – enough to cover the components without pulling in a font or an icon package. Reference an icon by name anywhere a component takes an icon argument, or render one directly with shad_icon().

Icon names are validated. Passing a name that isn’t in the set below throws an error rather than rendering nothing, so typos surface immediately.

Using icons

shad_icon("search")                                   # a bare 16×16 SVG
shad_button("Search", icon = "search")                # leading icon
shad_button(icon = "plus", size = "icon")             # icon-only button
shad_badge("Verified", icon = "check")                # in a badge
shad_menu_item("mail", "Send mail", icon = "mail")    # in a menu
shad_sidebar_item("inbox", "Inbox", icon = "mail")    # in the sidebar

Get the full list programmatically with shad_icon_names().

The set

Every icon in the package, at its native size. The name under each is exactly what you pass to icon =.

chevron-down
chevron-up
chevron-left
chevron-right
chevrons-up-down
chevrons-left-right
check
x
minus
plus
circle
dot
search
calendar
more-horizontal
more-vertical
mail
terminal
circle-alert
circle-check
info
triangle-alert
loader
arrow-left
arrow-right
menu
panel-left
file
folder
clock
arrow-up
arrow-down
chevrons-down-up
circle-x
circle-plus
circle-help
home
user
users
settings
bell
trash
pencil
download
upload
external-link
eye
eye-off
lock
unlock
heart
star
bookmark
filter
refresh-cw
log-out
log-in
copy
clipboard
save
sun
moon
image
link
phone
map-pin
credit-card
shopping-cart
package
bar-chart
activity
zap
message-circle
send
paperclip
thumbs-up
globe
github

Sizing & colour

Icons inherit the current text colour (currentColor), so they tint themselves to whatever context they sit in – wrap one in a coloured element and it follows. They render at 1rem by default; to resize a standalone icon, pass an inline style through ... (it overrides the default sizing), or attach the shad-icon--sm / shad-icon--lg class.

Code
tags$span(style = "color:var(--shad-primary)", shad_icon("circle-check"))
tags$span(style = "color:var(--shad-destructive)", shad_icon("triangle-alert"))
shad_icon("loader", style = "width:2rem;height:2rem")

Missing an icon?

The set is intentionally minimal. For anything outside it, pass your own SVG (or any tag) wherever an icon argument is accepted – the constructors take a tag just as readily as a name:

custom <- htmltools::tags$svg(
  xmlns = "http://www.w3.org/2000/svg", viewBox = "0 0 24 24",
  width = "16", height = "16", fill = "none", stroke = "currentColor",
  `stroke-width` = "2", htmltools::tags$path(d = "M12 2v20M2 12h20")
)
shad_button("Custom", icon = custom)