Icon

<sl-icon> | SlIcon
Since 1.0 stable

Icons are symbols that can be used to represent various options within an application.

FontAwesome icons usage

You can find FontAwesome icons here

If no name prefix is applied to the name attribute, the regular icon variant is used. Regular icons can also be used via the ‘far-’ prefix.

To use a ‘solid’ icon, prefix the name with fas-.

To use a brand icon, prefix the name with fab-.

To use a light icon, prefix the name with fal-.

gear

far-gear

fal-gear

fas-circle-check

fab-github

<p><sl-icon title='gear' name="gear"></sl-icon> gear</p>
<p><sl-icon title='far-gear' name="far-gear"></sl-icon> far-gear</p>
<p><sl-icon title='fal-gear' name="fal-gear"></sl-icon> fal-gear</p>
<p><sl-icon title='fas-circle-check' name="fas-circle-check"></sl-icon> fas-circle-check</p>
<p><sl-icon title='fab-github' name="fab-github"></sl-icon> fab-github</p>

Custom icons usage

To display custom HUB24 icons designed by the team, set the library and name attributes of an <sl-icon> element. The hub24 library resolves the icon name to the matching SVG in dist/icons/hub24/.

See collection for the current range of custom icons available in Helix.

Using an icon from the HUB24 library

Use the registered library for icons bundled with Helix. Add label when an icon conveys meaning without accompanying text.

<sl-icon
  library="hub24"
  name="sidenav"
  label="Side navigation"
  style="font-size: 2rem;"
></sl-icon>

Loading a hosted SVG

Use src when the consuming application hosts the SVG or loads it from a CORS-enabled endpoint.

<sl-icon
  src="https://hds.hub24.com.au/dist/icons/hub24/grid.svg"
  label="Grid"
  style="font-size: 2rem;"
></sl-icon>

Examples

Colors

Icons inherit their color from the current text color. Thus, you can set the color property on the <sl-icon> element or an ancestor to change the color.

<div style="color: #4a90e2;">
  <sl-icon name="triangle"></sl-icon>
  <sl-icon name="bell"></sl-icon>
</div>
<div style="color: #9013fe;">
  <sl-icon name="clock"></sl-icon>
  <sl-icon name="cloud"></sl-icon>
</div>
<div style="color: #417505;">
  <sl-icon name="flag"></sl-icon>
  <sl-icon name="heart"></sl-icon>
</div>
<div style="color: #f5a623;">
  <sl-icon name="star"></sl-icon>
  <sl-icon name="trash"></sl-icon>
</div>

Sizing

Icons are sized relative to the current font size. To change their size, set the font-size property on the icon itself or on a parent element as shown below.

<div style="font-size: 32px;">
  <sl-icon name="bell"></sl-icon>
  <sl-icon name="clock"></sl-icon>
  <sl-icon name="cloud"></sl-icon>
  <sl-icon name="download"></sl-icon>
</div>

Labels

For non-decorative icons, use the label attribute to announce it to assistive devices.

<sl-icon name="star" label="Add to favorites"></sl-icon>

Icon collection

Helix includes a collection of Font Awesome and custom HUB24 icons. Refer to the usage guidance above for more details.

Font Awesome

Helix includes regular, solid and light FontAwesome icons. Regular icons are used by default.

Showing 552 of 552 icons

alarm-clock
align-center
align-justify
align-left
align-right
angle-down
angle-left
angle-right
angles-left
angles-right
arrow-down
arrow-down-left
arrow-down-right
arrow-down-to-bracket
arrow-left
arrow-right
arrow-rotate-left
arrow-rotate-right
arrow-turn-down-right
arrow-up
arrow-up-from-bracket
arrow-up-left
arrow-up-right
arrow-up-right-and-arrow-down-left-from-center
arrow-up-right-from-square
arrows-left-right
arrows-rotate
arrows-up-down
asterisk
bags-shopping
ban
bars
bell
bold
book
bookmark
books
box-archive
briefcase
building
bullhorn
bullseye
bullseye-arrow
calendar
camera-retro
caret-down
caret-left
caret-right
caret-up
cart-shopping
chart-column
chart-sine
check
chevron-down
chevron-left
chevron-right
chevron-up
circle
circle-check
circle-exclamation
circle-info
circle-minus
circle-question
circle-user
circle-x
circle-xmark
clipboard
clipboard-check
clipboard-question
clock
clock-rotate-left
close
cloud
comment
copy
dash
diagram-subtask
diamond-exclamation
dollar-sign
download
ellipsis
ellipsis-vertical
envelope
equals
eraser
exclamation
exclamation-circle
eye
eye-slash
fab-github
fab-twitter
face-angry
face-frown
face-laugh
face-meh
face-smile
face-viewfinder
fal-alarm-clock
fal-align-center
fal-align-justify
fal-align-left
fal-align-right
fal-angle-down
fal-angle-left
fal-angle-right
fal-angles-left
fal-angles-right
fal-arrow-down
fal-arrow-down-left
fal-arrow-down-right
fal-arrow-down-to-bracket
fal-arrow-left
fal-arrow-right
fal-arrow-rotate-left
fal-arrow-rotate-right
fal-arrow-turn-down-right
fal-arrow-up
fal-arrow-up-from-bracket
fal-arrow-up-left
fal-arrow-up-right
fal-arrow-up-right-and-arrow-down-left-from-center
fal-arrow-up-right-from-square
fal-arrows-left-right
fal-arrows-rotate
fal-arrows-up-down
fal-asterisk
fal-bags-shopping
fal-ban
fal-bars
fal-bell
fal-bold
fal-book
fal-bookmark
fal-books
fal-box-archive
fal-briefcase
fal-building
fal-bullhorn
fal-bullseye
fal-bullseye-arrow
fal-calendar
fal-camera-retro
fal-caret-down
fal-caret-left
fal-caret-right
fal-caret-up
fal-cart-shopping
fal-chart-column
fal-chart-sine
fal-check
fal-chevron-down
fal-chevron-left
fal-chevron-right
fal-chevron-up
fal-circle
fal-circle-check
fal-circle-exclamation
fal-circle-info
fal-circle-minus
fal-circle-question
fal-circle-user
fal-circle-x
fal-circle-xmark
fal-clipboard
fal-clipboard-check
fal-clipboard-question
fal-clock
fal-clock-rotate-left
fal-close
fal-cloud
fal-comment
fal-copy
fal-dash
fal-diagram-subtask
fal-diamond-exclamation
fal-dollar-sign
fal-download
fal-ellipsis
fal-ellipsis-vertical
fal-envelope
fal-equals
fal-eraser
fal-exclamation
fal-exclamation-circle
fal-eye
fal-eye-slash
fal-face-angry
fal-face-frown
fal-face-laugh
fal-face-meh
fal-face-smile
fal-face-viewfinder
fal-file
fal-file-csv
fal-file-doc
fal-file-pdf
fal-flag
fal-folder
fal-gear
fal-gift
fal-grid-2
fal-grid-round
fal-grid-vertical
fal-grip-dots-vertical
fal-grip-vertical
fal-h1
fal-h2
fal-h3
fal-h4
fal-h5
fal-heart
fal-hexagon-check
fal-highlighter
fal-house
fal-house-chimney-heart
fal-id-card
fal-image
fal-images
fal-italic
fal-joystick
fal-lightbulb
fal-link
fal-link-simple
fal-list-ol
fal-list-ul
fal-magnifying-glass
fal-message-lines
fal-microphone
fal-minus
fal-minus-circle
fal-money-check-dollar
fal-note-sticky
fal-notes-sticky
fal-octagon-exclamation
fal-palette
fal-paragraph
fal-pen
fal-pen-square
fal-pen-to-square
fal-pencil
fal-people-group
fal-period
fal-phone
fal-piggy-bank
fal-plus
fal-presentation-screen
fal-print
fal-puzzle
fal-search
fal-share-from-square
fal-shield
fal-shield-check
fal-shield-xmark
fal-sliders
fal-sliders-simple
fal-sliders-up
fal-sort
fal-sort-down
fal-sort-up
fal-sparkle
fal-sparkles
fal-spinner
fal-square
fal-square-minus
fal-square-plus
fal-star
fal-stop
fal-table
fal-table-layout
fal-trash
fal-trash-alt
fal-trash-can
fal-triangle
fal-triangle-exclamation
fal-underline
fal-user
fal-user-magnifying-glass
fal-users
fal-wrench
fal-xmark
fas-alarm-clock
fas-align-center
fas-align-justify
fas-align-left
fas-align-right
fas-angle-down
fas-angle-left
fas-angle-right
fas-angles-left
fas-angles-right
fas-arrow-down
fas-arrow-down-left
fas-arrow-down-right
fas-arrow-down-to-bracket
fas-arrow-left
fas-arrow-right
fas-arrow-rotate-left
fas-arrow-rotate-right
fas-arrow-turn-down-right
fas-arrow-up
fas-arrow-up-from-bracket
fas-arrow-up-left
fas-arrow-up-right
fas-arrow-up-right-and-arrow-down-left-from-center
fas-arrow-up-right-from-square
fas-arrows-left-right
fas-arrows-rotate
fas-arrows-up-down
fas-asterisk
fas-bags-shopping
fas-ban
fas-bars
fas-bell
fas-bold
fas-book
fas-bookmark
fas-books
fas-box-archive
fas-briefcase
fas-building
fas-bullhorn
fas-bullseye
fas-bullseye-arrow
fas-calendar
fas-camera-retro
fas-caret-down
fas-caret-left
fas-caret-right
fas-caret-up
fas-cart-shopping
fas-chart-column
fas-chart-sine
fas-check
fas-chevron-down
fas-chevron-left
fas-chevron-right
fas-chevron-up
fas-circle
fas-circle-check
fas-circle-exclamation
fas-circle-info
fas-circle-minus
fas-circle-question
fas-circle-user
fas-circle-x
fas-circle-xmark
fas-clipboard
fas-clipboard-check
fas-clipboard-question
fas-clock
fas-clock-rotate-left
fas-close
fas-cloud
fas-comment
fas-copy
fas-dash
fas-diagram-subtask
fas-diamond-exclamation
fas-dollar-sign
fas-download
fas-ellipsis
fas-ellipsis-vertical
fas-envelope
fas-equals
fas-eraser
fas-exclamation
fas-exclamation-circle
fas-eye
fas-eye-slash
fas-face-angry
fas-face-frown
fas-face-laugh
fas-face-meh
fas-face-smile
fas-face-viewfinder
fas-file
fas-file-csv
fas-file-doc
fas-file-pdf
fas-flag
fas-folder
fas-gear
fas-gift
fas-grid-2
fas-grid-round
fas-grid-vertical
fas-grip-dots-vertical
fas-grip-vertical
fas-h1
fas-h2
fas-h3
fas-h4
fas-h5
fas-heart
fas-hexagon-check
fas-highlighter
fas-house
fas-house-chimney-heart
fas-id-card
fas-image
fas-images
fas-italic
fas-joystick
fas-lightbulb
fas-link
fas-link-simple
fas-list-ol
fas-list-ul
fas-magnifying-glass
fas-message-lines
fas-microphone
fas-minus
fas-minus-circle
fas-money-check-dollar
fas-note-sticky
fas-notes-sticky
fas-octagon-exclamation
fas-palette
fas-paragraph
fas-pen
fas-pen-square
fas-pen-to-square
fas-pencil
fas-people-group
fas-period
fas-phone
fas-piggy-bank
fas-plus
fas-presentation-screen
fas-print
fas-puzzle
fas-search
fas-share-from-square
fas-shield
fas-shield-check
fas-shield-xmark
fas-sliders
fas-sliders-simple
fas-sliders-up
fas-sort
fas-sort-down
fas-sort-up
fas-sparkle
fas-sparkles
fas-spinner
fas-square
fas-square-minus
fas-square-plus
fas-star
fas-stop
fas-table
fas-table-layout
fas-trash
fas-trash-alt
fas-trash-can
fas-triangle
fas-triangle-exclamation
fas-underline
fas-user
fas-user-magnifying-glass
fas-users
fas-wrench
fas-xmark
file
file-csv
file-doc
file-pdf
flag
folder
gear
gift
grid-2
grid-round
grid-vertical
grip-dots-vertical
grip-vertical
h1
h2
h3
h4
h5
heart
hexagon-check
highlighter
house
house-chimney-heart
id-card
image
images
italic
joystick
lightbulb
link
link-simple
list-ol
list-ul
magnifying-glass
message-lines
microphone
minus
minus-circle
money-check-dollar
note-sticky
notes-sticky
octagon-exclamation
palette
paragraph
pen
pen-square
pen-to-square
pencil
people-group
period
phone
piggy-bank
plus
presentation-screen
print
puzzle
search
share-from-square
shield
shield-check
shield-xmark
sliders
sliders-simple
sliders-up
sort
sort-down
sort-up
sparkle
sparkles
spinner
square
square-minus
square-plus
star
stop
table
table-layout
trash
trash-alt
trash-can
triangle
triangle-exclamation
underline
user
user-group
user-magnifying-glass
users
wrench
xmark

Custom icons

The following custom HUB24 icons are available.

grid
logo-icon-myhub
sidenav
type=CSV
type=DOC
type=Other
type=PDF
type=TXT
type=ZIP

New icon requests

Can’t find the icon you’re looking for? It is likely not added to Helix yet.

  • Notify the designer in your scrum team or make a post in the design system working group teams channel so that the design system team can get it sorted.
  • Designers should refer to the FontAwesome website for the full range of icons on offer and note down the icon names that are required for new icon requests.

Note: Scrum team designers should make effort to ensure that new icons have been added to the design system before development for a project has started.

If you want to add new icons yourself, refer below and you’ll also need to be a contributor for Helix. See Contributing.

To keep the size of deployments to a minimum, we only include the icons that are needed. To add an icon that is not already included, copy the SVG file from the ZIP file in the root folder of this repository into the corresponding src/icons/fontawesome/svgs/{solid/light/regular/brands} folder.

Icons from the solid, regular, light and brands categories are available for inclusion. To add other variants, it will be necessary to modify src/register-font-awesome.js and define a new prefix for that variant.

Properties

Name Description Reflects Type Default
name The name of the icon to draw. Available names depend on the icon library being used. string | undefined -
src An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and can result in XSS attacks. string | undefined -
label An alternate description to use for assistive devices. If omitted, the icon will be considered presentational and ignored by assistive devices. string ''
library The name of a registered custom icon library. string 'default'
updateComplete A read-only promise that resolves when the component has finished updating.

Learn more about attributes and properties.

Events

Name React Event Description Event Detail
sl-load Emitted when the icon has loaded. When using spriteSheet: true this will not emit. -
sl-error Emitted when the icon fails to load due to an error. When using spriteSheet: true this will not emit. -

Learn more about events.

Parts

Name Description
svg The internal SVG element.
use The element generated when using spriteSheet: true

Learn more about customizing CSS parts.