Skip to content

Form Wrapper

Use the FormWrapper component to wrap multiple form inputs and labels that appear next to each other. It will apply styling to give spacing between each input.

See all the examples and details in the Storybook.

Usage

tsx
import { FormWrapper, TextInput } from "@samgl/graffiti-ui";

const MyFormWrapper = () => {
  return (
    <FormWrapper>
      <TextInput
        label="Email"
        placeholder="youremail@example.com"
        type="email"
      />
      <TextInput label="Password" placeholder="************" type="password" />
    </FormWrapper>
  );
};

Props

PropTypeDefaultOptionalDescription
childrenReactNodeThe content of the FormWrapper.
classNamestringThe class name of the component, generally used when extending the component with a styled component.