Select Component
Dropdown menu for selecting from predefined options.
Usage
import { FormFlow, Select, SubmitButton } from '@formflow.sh/react';
function MyForm() {
return (
<FormFlow apiKey="ff_live_xxx">
<Select
name="plan"
label="Choose a Plan"
options={['Free', 'Pro', 'Enterprise']}
required
/>
<SubmitButton>Submit</SubmitButton>
</FormFlow>
);
}Props
| Prop | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Field name for form submission |
options | string[] | Yes | Array of options to display |
label | string | No | Label text displayed above the select |
placeholder | string | No | Placeholder text for first option. Default: "Select..." |
required | boolean | No | Make the field required. Default: false |
disabled | boolean | No | Disable the select. Default: false |
Examples
Service Selection
<Select
name="service"
label="Select Service"
options={['Consultation', 'Development', 'Design', 'Support']}
placeholder="Choose a service..."
required
/>Priority Level
<Select
name="priority"
label="Priority"
options={['Low', 'Medium', 'High', 'Critical']}
/>Budget Range
<Select
name="budget"
label="Budget Range"
options={[
'Less than $1,000',
'$1,000 - $5,000',
'$5,000 - $10,000',
'More than $10,000'
]}
/>