Box
The Box component is a container for other components.
Last updated
The Box component is a container for other components.
Last updated
Properties | Description | Required? | Default |
---|---|---|---|
In this example, we will make a Whisper that has a Box component with two children. Both of the children will be buttons that will be placed side by side.
alignItems
AlignItems.Center
:
Aligns content to center of box
AlignItems.FlexStart
: Aligns content to start of box
AlignItems.FlexEnd
:
Aligns content to end of box
AlignItems.Stretch
:
Aligns content to stretch evenly over length of box
undefined
children
Array of components inside of box
undefined
customHeight
Set height for box, options are:
CustomHeight.Small
,
CustomHeight.Medium
,
CustomHeight.Large
, or
CustomHeight.ExtraLarge
undefined
direction
Set direction of box options are: Direction.Horizontal
, or Direction.Vertical
undefined
justifyContent
Set how the box children fill the space of the box:
JustifyContent
, JustifyContent.Center
, JustifyContent.Left
, JustifyContent.Right
, JustifyContent.Normal
, JustifyContent.FlexStart
, JustifyContent.FlexEnd
, JustifyContent.SpaceAround
, JustifyContent.SpaceBetween
, or JustifyContent.SpaceEvenly
undefined
onClick
Callback function that executes when the component is clicked
undefined