Skip to main content
Version: Next

Icon

A single scalable vector icon from the icon library. Bind its color to a state tag through a map transform and it becomes a status indicator.

The Icon component as it renders with its default settings.The Icon component as it renders with its default settings.

Reach for it when you need:

  • Running/stopped/faulted indicators
  • Decorating a label or a menu entry

Component name: Icon · Category: Display

In the palette: A single scalable vector icon from the icon library

Properties

Any property can be bound to a tag, another component's property, or a query.

PropertyTypeDefaultDescription
iconiconStarPick from the icon library
colorcolorvar(--widget-value)
strokeWidthnumber2
paddingnumber6
stylestyle{}Custom CSS properties

Events

Attach event actions to these in the Event Manager.

EventLabelGroupPayload
clickClickMouseThe DOM event.
dblclickDouble clickMouseThe DOM event.
contextmenuRight clickMouseThe DOM event.
mouseenterMouse enterMouseThe DOM event.
mouseleaveMouse leaveMouseThe DOM event.
Right-click behaves differently in the Designer

contextmenu fires your configured actions at runtime only — in LiveView and in preview. On the Designer canvas the right-click is captured to open the Event Manager, so testing it there will not run your actions. Test right-click in preview.

Notes

Do not use colour alone for anything safety-relevant — roughly 8% of men cannot separate your red from your green. Pair colour with a different icon or a label.