This component renders an icon for decorating the adjacent text. It can be used only in a baseline box.

| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Y | Set this parameter to icon. |
| url | string | Y | Image URL (PNG format recommended, HTTPS only) Maximum size: 1 MB Maximum length: 1,000 characters |
| margin | string | N | The minimum space between the component and the previous component in the parent component. For more information, see margin. |
| position | string | N | The reference point for the offsetTop, offsetBottom, offsetStart, and offsetEnd properties. Specify one of the following values:• relative: Uses the previous box as the reference point.• absolute: Uses the upper left corner of the parent component as the reference point.The default value is relative. For more information, see Offset. |
| offsetTop | string | N | Top offset For more information, see Offset. |
| offsetBottom | string | N | Bottom offset For more information, see Offset. |
| offsetStart | string | N | Left offset. For more information, see Offset. |
| offsetEnd | string | N | Right offset. For more information, see Offset. |
| size | string | N | Maximum width of the icon. Specify one of the following values: xxs, xs, sm, md, lg, xl, xxl, 3xl, 4xl, and 5xl.The icon width increases in the order the values are listed. The default value is md. |
| aspectRatio | string | N | Aspect ratio. Enter a value in {width}:{height} format.Specify the {width} and {height} values between 1 and 10,000.Note that the {height} cannot exceed three times the {width}.The default value is 1:1. |
※ The flex property of the icon component must be set to 0.
{ "type": "bubble", "body": { "type": "box", "layout": "vertical", "contents": [ { "type": "box", "layout": "baseline", "contents": [ { "type": "icon", "url": "https://developers.worksmobile.com/image/en/bot/message_type/icon.png", "size": "md" }, { "type": "text", "text": "How may I help you?", "size": "md", "margin": "sm" } ] }, { "type": "box", "layout": "baseline", "contents": [ { "type": "icon", "url": "https://developers.worksmobile.com/image/en/bot/message_type/icon.png", "size": "lg" }, { "type": "text", "text": "How may I help you?", "size": "lg", "margin": "sm" } ] }, { "type": "box", "layout": "baseline", "contents": [ { "type": "icon", "url": "https://developers.worksmobile.com/image/en/bot/message_type/icon.png", "size": "xl" }, { "type": "text", "text": "How may I help you?", "size": "xl", "margin": "sm" } ] }, { "type": "box", "layout": "baseline", "contents": [ { "type": "icon", "url": "https://developers.worksmobile.com/image/en/bot/message_type/icon.png", "size": "xxl" }, { "type": "text", "text": "How may I help you?", "size": "xxl", "margin": "sm" } ] }, { "type": "box", "layout": "baseline", "contents": [ { "type": "icon", "url": "https://developers.worksmobile.com/image/en/bot/message_type/icon.png", "size": "3xl" }, { "type": "text", "text": "How may I help you?", "size": "3xl", "margin": "sm" } ] } ] }}