class Line::Message::Builder::Flex::Span

Represents a span component in a LINE Flex Message.

Span components are used within a Text component to apply different styling to specific portions of text. They offer various styling options, including size, weight, color, and decoration. Unlike Text components, spans cannot have actions attached to them.

Example

Line::Message::Builder.with do
  flex alt_text: "Span Example" do
    bubble do
      body do
        text do
          span "Hello, ", color: "#FF0000"
          span "Flex ", weight: :bold
          span "World!", size: :xl, decoration: :underline
        end
      end
    end
  end
end

See also: