InlineStack

GithubStorybook

A utility component for creating horizontal flex containers.

Importing

The component can be imported via:

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

Alignment

Alignment within the flex container can be controlled with the alignBlock and alignInline props.

  • alignBlock controls alignment along the block axis (typically the vertical axis)
  • alignInline controls alignment along the inline axis (typically the horizontal axis)

Internally, these props are translated to the align-items and justify-content CSS properties.

alignBlock

Loading editor

alignInline

Loading editor

Wrap

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

Loading editor

API

Default:start

How space is distributed along the block axis (vertical). This corresponds to align-items when flex-direction is column. MDN Align Items

Default:start

How space is distributed along the inline axis (horizontal). This corresponds to justify-content when flex-direction is row. MDN Justify Content

Default:'div'

What element or component should be rendered.

Default:false

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

On this page