Appearance
@line/bot-sdk / FlexBox
Type Alias: FlexBox
FlexBox =
object&Offset
Defined in: lib/types.ts:979
This is a component that defines the layout of child components. You can also include a box in a box.
Type Declaration
action?
optionalaction:Action
Action performed when this button is tapped.
Specify an action object.
alignItems?
optionalalignItems:"flex-start"|"center"|"flex-end"
How child elements are aligned along the cross axis of the parent element. For more information, see Arranging a box's child elements and free space in the Messaging API documentation.
background?
optionalbackground:Background
backgroundColor?
optionalbackgroundColor:string
Background color of the block. In addition to the RGB color, an alpha channel (transparency) can also be set. Use a hexadecimal color code. (Example:#RRGGBBAA) The default value is #00000000.
borderColor?
optionalborderColor:string
Color of box border. Use a hexadecimal color code.
borderWidth?
optionalborderWidth:string|"none"|"light"|"normal"|"medium"|"semi-bold"|"bold"
Width of box border. You can specify a value in pixels or any one of none, light, normal, medium, semi-bold, or bold. none does not render a border while the others become wider in the order of listing.
contents
contents:
FlexComponent[]
Components in this box. Here are the types of components available:
- When the
layoutproperty ishorizontalorvertical: - When the
layoutproperty isbaseline:
cornerRadius?
optionalcornerRadius:string|"none"|"xs"|"sm"|"md"|"lg"|"xl"|"xxl"
Radius at the time of rounding the corners of the border. You can specify a value in pixels or any one of none, xs, sm, md, lg, xl, or xxl. none does not round the corner while the others increase in radius in the order of listing. The default value is none.
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.
height?
optionalheight:string
Height of the box. For more information, see Height of a box in the API documentation.
justifyContent?
optionaljustifyContent:"flex-start"|"center"|"flex-end"|"space-between"|"space-around"|"space-evenly"
How child elements are aligned along the main axis of the parent element. If the parent element is a horizontal box, this only takes effect when its child elements have their flex property set equal to 0. For more information, see Arranging a box's child elements and free space in the Messaging API documentation.
layout
layout:
"horizontal"|"vertical"|"baseline"
The placement style of components in this box. Specify one of the following values:
horizontal: Components are placed horizontally. Thedirectionproperty of the bubble container specifies the order.vertical: Components are placed vertically from top to bottom.baseline: Components are placed in the same way ashorizontalis specified except the baselines of the components are aligned.
For more information, see Types of box layouts.
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.
maxHeight?
optionalmaxHeight:string
Max height of the box. For more information, see Max height of a box in the API documentation.
maxWidth?
optionalmaxWidth:string
Max width of the box. For more information, see Max width of a box in the API documentation.
paddingAll?
optionalpaddingAll:string
Free space between the borders of this box and the child element. For more information, see Box padding in the API documentation.
paddingBottom?
optionalpaddingBottom:string
Free space between the border at the lower end of this box and the lower end of the child element. For more information, see Box padding in the API documentation.
paddingEnd?
optionalpaddingEnd:string
Free space between the border at the right end of this box and the right end of the child element. For more information, see Box padding in the API documentation.
paddingStart?
optionalpaddingStart:string
Free space between the border at the left end of this box and the left end of the child element. For more information, see Box padding in the API documentation.
paddingTop?
optionalpaddingTop:string
Free space between the border at the upper end of this box and the upper end of the child element. For more information, see Box padding in the API documentation.
spacing?
optionalspacing:string|"none"|"xs"|"sm"|"md"|"lg"|"xl"|"xxl"
Minimum space between components in this 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
none. - To override this setting for a specific component, set the
marginproperty of that component.
type
type:
"box"
width?
optionalwidth:string
Width of the box. For more information, see Width of a box in the API documentation.