Propel

Input Field

A labeled single-line text field with optional hint and error messaging.

Basic

We'll use this to send you receipts.

We'll never share your email.

Show code
import { InputField } from "@makeplane/propel/components/input-field";

export default function BasicDemo() {
  return (
    <InputField
      magnitude="md"
      orientation="vertical"
      label="Email"
      placeholder="you@example.com"
      description="We'll use this to send you receipts."
      hint="We'll never share your email."
    />
  );
}

Magnitudes

Show code
import { InputField, type InputMagnitude } from "@makeplane/propel/components/input-field";

const MAGNITUDES: InputMagnitude[] = ["md", "lg", "xl"];

export default function MagnitudesDemo() {
  return (
    <div className="flex flex-col gap-4">
      {MAGNITUDES.map((magnitude) => (
        <InputField
          key={magnitude}
          magnitude={magnitude}
          orientation="vertical"
          label={magnitude}
          placeholder="you@example.com"
        />
      ))}
    </div>
  );
}

Horizontal

The horizontal orientation places the label beside the control instead of above it.

Shown across your projects.

Show code
import { InputField } from "@makeplane/propel/components/input-field";

export default function HorizontalDemo() {
  return (
    <InputField
      magnitude="md"
      orientation="horizontal"
      label="Workspace name"
      placeholder="Acme Inc."
      hint="Shown across your projects."
    />
  );
}

With icons

Show code
import { Icon } from "@makeplane/propel/components/icon";
import { InputField } from "@makeplane/propel/components/input-field";
import { AtSign, Search } from "lucide-react";

export default function WithIconsDemo() {
  return (
    <InputField
      magnitude="md"
      orientation="vertical"
      label="Search members"
      placeholder="Search…"
      startIcon={<Icon icon={Search} tint="placeholder" />}
      endIcon={<Icon icon={AtSign} tint="placeholder" />}
    />
  );
}

Invalid

Enter a valid email address.
Show code
import { InputField } from "@makeplane/propel/components/input-field";

export default function InvalidDemo() {
  return (
    <InputField
      magnitude="md"
      orientation="vertical"
      label="Email"
      required
      defaultValue="not-an-email"
      error="Enter a valid email address."
    />
  );
}

Installation

import { InputField } from "@makeplane/propel/components/input-field";

Props

InputField

PropTypeRequiredDescription
magnitude"md" | "lg" | "xl"YesMagnitude scale. `md` | `lg` | `xl`.
labelstringNoLabel text shown above (or beside) the control.
descriptionReactNodeNoSupporting text shown directly below the label.
hintReactNodeNoHelper text shown below the control. Replaced by `error` when an error is set.
errorReactNodeNoError text shown below the control. Overrides `hint` and marks the field invalid (danger border).
orientation"horizontal" | "vertical"YesLabel placement: `vertical` (label above) | `horizontal` (label beside).
startIconReactNodeNoElement rendered at the inline start of the control, e.g. `<Icon icon={Search} />`.
endIconReactNodeNoElement rendered at the inline end of the control, e.g. `<Icon icon={Mail} />`.