Skip to main content

Icons

Superblocks comes with a native library of over 3,000 icons which can be used across components. The library is powered by Material Symbols.

icons library

Using Icons

Icons are available in Text, Input, Dropdown, Button, and Table components. In these components that natively support icons, set the icon properties below to configure the icon display.

application using icons

In addition, icons can be used in a standalone Icon component.

Icon Properties

PropertyDescriptionExample Value
IconThe icon to displaySelect the icon in the form or use {{ icons.NAME }} in code (e.g., {{ icons.error }}).
Icon PositionThe position of the icon, a string of either RIGHT or LEFTRIGHT

Icons in JavaScript

You can dynamically configure which icon is displayed by referencing icons in code mode using JavaScript. This is particularly relevant for table columns, as the icon to display is often dependent on the data in the column, as well as for buttons which may dynamically change based on other factors in the app.

To leverage this functionality, switch an icon field into <> Code mode and type {{ icons. }} to open the icon selector. Selecting an icon then injects the name of the icon into the binding. The example below uses the JavaScript conditional operator to set different icons based on the value in the status column of a table.

icons in JS