Appearance
@line/bot-sdk / FlexImage
Type Alias: FlexImage
FlexImage =
object&Offset
Defined in: lib/types.ts:1367
This component draws an image.
Type Declaration
action?
optionalaction:Action
Action performed when this button is tapped. Specify an action object.
align?
optionalalign:"start"|"end"|"center"
Horizontal alignment style. Specify one of the following values:
start: Left-alignedend: Right-alignedcenter: Center-aligned
The default value is center.
animated?
optionalanimated:Boolean
When this is true, an animated image (APNG) plays. You can specify a value of true up to three times in a single message. You can't send messages that exceed this limit. This is false by default. Animated images larger than 300 KB aren't played back.
aspectMode?
optionalaspectMode:"cover"|"fit"
Style of the image. Specify one of the following values:
cover: The image fills the entire drawing area. Parts of the image that do not fit in the drawing area are not displayed.fit: The entire image is displayed in the drawing area. The background is displayed in the unused areas to the left and right of vertical images and in the areas above and below horizontal images.
The default value is fit.
aspectRatio?
optionalaspectRatio:string
Aspect ratio of the image. {width}:{height} format. Specify the value of {width} and {height} in the range from 1 to 100000. However, you cannot set {height} to a value that is more than three times the value of {width}. The default value is 1:1.
backgroundColor?
optionalbackgroundColor:string
Background color of the image. Use a hexadecimal color code.
flex?
optionalflex:number
The ratio of the width or height of this box within the parent box.
The default value for the horizontal parent box is 1, and the default value for the vertical parent box is 0.
- For more information, see Width and height of components.
gravity?
optionalgravity:"top"|"bottom"|"center"
Vertical alignment style. Specify one of the following values:
top: Top-alignedbottom: Bottom-alignedcenter: Center-aligned
The default value is top.
If the layout property of the parent box is baseline, the gravity property will be ignored.
margin?
optionalmargin:string|"none"|"xs"|"sm"|"md"|"lg"|"xl"|"xxl"
Minimum space between this box and the previous component in the parent box.
nonedoes not set a space while the other values set a space whose size increases in the order of listing.- The default value is the value of the
spacingproperty of the parent box. - If this box is the first component in the parent box, the
marginproperty will be ignored.
size?
optionalsize:string|"xxs"|"xs"|"sm"|"md"|"lg"|"xl"|"xxl"|"3xl"|"4xl"|"5xl"|"full"
Maximum size of the image width. The size increases in the order of listing. The default value is md. For more information, see Image size in the Messaging API documentation.
type
type:
"image"
url
url:
string
Image URL (Max character limit: 2000)
- Protocol: HTTPS
- Image format: JPEG or PNG
- Maximum image size: 1024×1024 pixels
- Maximum data size: 1 MB