A flexible layout component for arranging form elements with customizable spacing.

Importing

The component can be imported via:

import { FormLayout, FormLayoutGroup } from '@customerio/pluma-components/react';
<FormLayout>
    <TextField label="First name" />
    <TextField label="Last name" />
</FormLayout>

Horizontal Grouping

The FormLayoutGroup is used for horizontally aligning form items within a FormLayout. This is useful for grouping related inputs such as first and last names or other paired fields.

<FormLayout>
    <FormLayoutGroup>
        <TextField label="First name" />
        <TextField label="Last name" />
    </FormLayoutGroup>
    <TextField label="Email" />
</FormLayout>

Gap Customization

The gap prop allows you to control the spacing between child elements. This should not be used unless explicitly told by a designer.

<FormLayout gap="600">
    <TextField label="First name" />
    <TextField label="Last name" />
</FormLayout>

On this page