AisIcon

AisIcon encapsulates our use of the FontAwesome icon library (v6). Any FontAwesome (free) icon can be imported and loaded. Additionally, a core set of icons are available through semantic keys, e.g. edit.

Icon

The icon prop accepts either an object imported from the FontAwesome icon packs or a string specifying one of the preloaded, core icons.

Core Icons

AisIcon loads a set of core icons by default and exposes them through semantic keys. They can be rendered by passing the appropriate key to the icon prop. The keys are listed below.

arrow
asterisk
busy
new
edit
confirm
cancel
save
copy
delete
close
undo
redo
search
filter
info
success
required
error
warning
danger
unknown
person
user
users
group
menu
options
calendar
clock
money
heart
star
locked
unlocked
upload
download
left
right
up
down
first
last
caret-left
caret-right
caret-up
caret-down
file
file-pdf
file-csv
file-excel
file-word
file-powerpoint
file-image
file-video
file-upload
default
primary
secondary
bold
italic
strikethrough
list
list-ol
subscript
superscript

Load Icon

Components and client applications may load any FontAwesome icon by importing the icon definition directly from one of the FontAwesome icon packs. Client applications must also declare the necessary icon packs as dependencies.

Accessible

Styled Icons

Icons can be styled with standard Tailwind classes.

Styled

Unknown Icon

When AisIcon does not recognize an icon it will show a question mark. If you see this unexpectedly, something is wrong with your icon specification. AisIcon will also emit a warning in the console.

Unknown