class Line::Message::Builder::Flex::Box

Represents a “box” component in a LINE Flex Message.

A box is a fundamental layout container that arranges its child components (contents) in a specified direction (layout: horizontal, vertical, or baseline). It can hold various other components like text, images, buttons, or even nested boxes, allowing for complex layouts.

Boxes have numerous properties to control their appearance and the arrangement of their children, such as padding, margin, spacing between items, justification, and alignment.

A box can also have an action associated with it, making the entire box area tappable.

Example

Line::Message::Builder.with do
  flex alt_text: "Box example" do
    bubble do
      body do
        layout :horizontal
        spacing :md
        text "Item 1"
        text "Item 2"
      end
    end
  end
end

See also: