Skip to main content

Form Group

FormGroup components are wrappers that create controlled heirarchy of inner form elements and include a bottom margin to separate form elements into their respective groupings.

Implementation#

import { FormGroup } from "slipstream-ui";
const Example = () => <FormGroup>...</FormGroup>;

Example#

Example
<FormGroup>
<Label>First Name</Label>
<Input name="firstName" type="text" />
</FormGroup>

Inline#

Example
<FormGroup inline>
<Label className="pr-2">First Name</Label>
<Input name="firstName" type="text" />
</FormGroup>

Props#

AttributeTypeValueDefault ValueDescription
marginstringundefinedReplaces margin classes with user defined margin classes
inlinebooleantrue/falseundefinedSets Label and Input inline removing margins and full width