Carousel

A carousel is a container that contains multiple message bubbles as child components. The message bubbles in a carousel can be browsed by scrolling horizontally.

The maximum size of JSON data defining a carousel is limited to 30 KB.

Request {#carousel-request-parameter}

ParameterTypeRequiredDescription
typestringYSet this parameter to carousel.
contentsstringYBubbles in a carousel. Maximum number: 10 bubbles

Note

  • Bubbles with different widths cannot be added to one carousel (the size property). The bubbles added to a single carousel must all be the same width.
  • The heights of all the bubbles contained in a single carousel are adjusted to fit the tallest bubble. Note that the heights of bubbles with no body will not change.

Request example {#carousel-request-example}

{  "type": "carousel",  "contents": [    {      "type": "bubble",      "body": {        "type": "box",        "layout": "horizontal",        "contents": [          {            "type": "text",            "text": "The Message Bot API enables the client to interact with individual users, by using a message bot account.",            "wrap": true          }        ]      },      "footer": {        "type": "box",        "layout": "horizontal",        "contents": [          {            "type": "button",            "style": "primary",            "action": {              "type": "uri",              "label": "See more",              "uri": "http://worksmobile.com"            },            "height": "sm"          }        ]      }    },    {      "type": "bubble",      "body": {        "type": "box",        "layout": "horizontal",        "contents": [          {            "type": "text",            "text": "Hello, World!",            "wrap": true          }        ]      },      "footer": {        "type": "box",        "layout": "horizontal",        "contents": [          {            "type": "button",            "style": "primary",            "action": {              "type": "uri",              "label": "See more",              "uri": "http://worksmobile.com"            },            "height": "sm"          }        ]      }    }  ]}