Input Component
Text input field for capturing user data in custom forms.
Usage
import { FormFlow, Input, SubmitButton } from '@formflow.sh/react';
function MyForm() {
return (
<FormFlow apiKey="ff_live_xxx">
<Input
name="email"
type="email"
label="Email Address"
required
/>
<SubmitButton>Submit</SubmitButton>
</FormFlow>
);
}Props
| Prop | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Field name for form submission |
type | string | No | Input type (text, email, tel, url, etc.). Default: "text" |
label | string | No | Label text displayed above the input |
placeholder | string | No | Placeholder text shown when empty |
required | boolean | No | Make the field required. Default: false |
disabled | boolean | No | Disable the input. Default: false |
Examples
Email Input
<Input
name="email"
type="email"
label="Email"
placeholder="you@example.com"
required
/>Phone Number
<Input
name="phone"
type="tel"
label="Phone Number"
placeholder="+1 (555) 123-4567"
/>URL Input
<Input
name="website"
type="url"
label="Website"
placeholder="https://example.com"
/>