class Line::Message::Builder::Flex::Carousel

Represents a carousel container in a LINE Flex Message. A carousel is a horizontally scrollable sequence of Bubble components. Each bubble in the carousel is a distinct message unit. Users can swipe left or right to view the different bubbles.

Carousels are ideal for presenting multiple items, such as products, articles, or options, in a compact and interactive way.

Line::Message::Builder.with do
  flex alt_text: "Product Showcase" do
    carousel do
      bubble size: :mega do
        hero_image "https://example.com/product1.jpg"
        body { text "Product 1" }
      end
      bubble size: :mega do
        hero_image "https://example.com/product2.jpg"
        body { text "Product 2" }
      end
    end
  end
end

See also: