Jump to content

Template:Icon

From Swarthmore Knowledge Base

Inserts an inline Lucide icon. The icon is an SVG that uses currentColor, so by default it inherits the surrounding text colour and follows dark mode automatically.

Usage

{{Icon|check}}
{{Icon|triangle-alert|size=lg|color=warning}}
{{Icon|external-link|label=Opens in a new tab}}

Parameters

Parameter Default Description
1 — Icon name (see list below). Required.
size em em (matches font size), xs, sm, md, lg, xl
color inherits muted, brand, info, success, warning, danger. Omit to match the surrounding text.
stroke 2 Stroke width, 0.5–4. Use 1.5 for large icons.
label — Accessible label. Omit when the icon sits next to text that already describes it; supply it when the icon is the only content (e.g. an icon-only link).
class — Escape hatch for extra classes. Only classes already present in the Prism UI build take effect; prefer color and size.

Available icons

The icon set is defined by the Prism UI extension and shown here directly from the build, so this list is always current. Requesting a name not in the set shows an error and adds the page to Category:Pages with unknown Prism UI icons.

accessibility
app-window
arrow-left
arrow-right
backpack
banknote
bird
book-open
bookmark
brain
cake
calendar
check
chevron-down
chevron-left
chevron-right
chevron-up
circle-alert
circle-check
circle-question-mark
circle-user-round
circle-x
clock
cloud-download
copy
cpu
download
external-link
eye
eye-off
file-text
frown
gift
globe
graduation-cap
house
image
info
key-round
library
lightbulb
link
lock
mail
mail-open
menu
microscope
minus
monitor
newspaper
pencil
phone
plus
printer
refresh-cw
search
send
settings
shield-alert
shield-check
smartphone
sparkle
sparkles
star
tag
terminal
trash-2
triangle-alert
upload
user
users
users-round
variable
video
wifi
x
zap
brand-android
brand-gmail
brand-google-drive
brand-google
file-spreadsheet

Templates in the extension call {{#icon:}} directly; this template is a convenience wrapper for editors and produces identical output.