Componentsv2.189.1
Iconsv1.19.0
MCPv0.8.62
Tokensv0.34.3

A utility component for creating flex containers.

Importing

The component can be imported via:

import { Flex } from '@customerio/pluma-components/react';
Loading editor

Usage

The PlumaFlex component is a wrapper around Box for making it easier to create flex containers.

Flex direction

The flex direction can be controlled with the direction prop:

Loading editor

Gap

The gap between items can be controlled with the gap prop, which accepts space token values. rowGap and columnGap are also available for more fine-grained control of the gaps.

Loading editor

Alignment

Main and cross axis alignment can be controlled with justifyContent and alignItems. For example:

Loading editor

Wrap

The flex container can be set to wrap with the wrap prop. It accepts a boolean value, or a wrap or nowrap string;

Loading editor

API

PlumaFlex extends Box

Default:row

The direction of the flex container. MDN Flex Direction

Default:false

Whether flex items should wrap over multiple lines. MDN Flex Wrap

On this page