Skip to main content

flex Component

warning

Components is not ready yet.

Overview

A flexible container component built using CSS Flexbox.

Properties

PropertyAttributeDescriptionTypeDefault
alignalignSpecifies the alignment along the cross axis."baseline" | "center" | "flex-end" | "flex-start" | "stretch"'center'
directiondirectionDetermines the flex direction."column" | "column-reverse" | "row" | "row-reverse"'row'
gapgapSets the gap between flex items. When a number is provided, it is converted to a CSS variable of the form: var(--spacing-{gap}, 1rem). For example, a value of 200 translates to 'var(--spacing-200, 1rem)'. You may also pass a full CSS gap value (e.g. "1rem", "10px", etc.) directly.number | stringDEFAULT_GAP
isCenteris-centerCenters the flex items along both axes if set to true.booleanfalse
justifyjustifySpecifies the alignment along the main axis."center" | "flex-end" | "flex-start" | "space-around" | "space-between" | "space-evenly"'flex-start'

Slots

SlotDescription
Default slot for flex items.

Built with StencilJS