Icon
tile/icon
Shows a standalone icon.
| Name | Required | Lightning Type | Default | Description |
|---|---|---|---|---|
| alt | No | lightning__textType | An alternative text that describes what the icon conveys, for accessibility. Recommended to be concise (under 125 characters); an empty string (the default) marks the icon as decorative and hides it from screen readers. | |
| color | No | lightning__textType | default | The color of the icon. Valid values include default, error, muted, primary, success, and warning. |
| name | Yes | lightning__iconName | A semantic icon identifier specifying which icon symbol to show. | |
| size | No | lightning__textType | md | The size of the icon. Valid values include xs for extra small, sm for small, md for medium (default), lg for large, and xl for extra large. |
Use an icon to show a standalone symbol that conveys meaning instantly, such as with a status indicator, a visual cue next to a label, or a lightweight decorative mark. Set name to choose the symbol, and use size and color to fit it to its context.
To label an icon, place both in a tile/row and align them on the center axis.
For available icons, see the HXL Playground Editor.
Use these size values to control the icon size.
xs: Extra small icons for dense inline contexts where the icon accompanies small text.sm: Small icons for compact rows and secondary cues.md(default): Medium icons for most standalone and labeled uses.lg: Large icons for emphasis or when the icon is a focal point.xl: Extra large icons for hero-style or feature callouts where the icon leads.
Use these color values to convey status or match the icon to its surrounding context.
default(default): Neutral foreground color for decorative or non-status icons.error: Signals a failure or destructive state, such as a validation error.muted: Subdued, low-emphasis color for secondary or supporting cues.primary: The brand accent color to highlight a key icon.success: Signals a positive or completed state, such as a confirmation.warning: Signals caution or a state that requires attention.
Consider these guidelines when working with icons.
- Match
colorto meaning — usesuccess,warning, anderrorfor status and reservedefaultormutedfor decorative marks. - Pair an icon with a
tile/textlabel when the symbol alone can be ambiguous. Wrap both in atile/row. - Keep
sizeconsistent with neighboring text so the icon aligns to the line rather than towering over it. - To make an icon trigger an action, attach the base
actionattribute instead of using atile/button. - On surfaces with a limited icon set, choose common, well-known
namevalues so they don’t fall back to a generic symbol.
Note any limitations that apply to this component.
No known limitations for tile/icon in Slackbot.
No known limitations for tile/icon in ChatGPT.
No known limitations for tile/icon in Agentforce. name maps to an SLDS styled icon.