Skip to main content

Basic Example

Live Example

Example Code

Properties

string
required
Identifies this as an icon blockMust be icon
string
required
The name of the icon to display (e.g., ‘IconHomeLine’, ‘IconUserLine’)
string
default:"medium"
required
The size of the iconAllowed values: x-small, small, medium, large
string
default:"inline"
required
Alignment of the icon. Use ‘inline’ for inline display with text, or ‘start’/‘center’/‘end’ for block-level alignmentAllowed values: start, end, center, inline
string
required
Color of the icon. When specified, the icon will be wrapped in a Text element to apply the colorAllowed values: primary, secondary, primary-inverse, secondary-inverse, success, brand, warning, danger, alert
string
default:"none"
required
Margin spacing around the icon blockAllowed values: none, auto, xxx-small, xx-small, x-small, small, medium, large, x-large, xx-large

Usage Notes

  • This element is part of the BlockKit system for building dynamic user interfaces
  • All properties marked as (required) must be included in your JSON structure
  • Optional properties can be omitted and will use their default values when applicable