Checkbox Component
Checkbox input for terms of service, newsletters, and optional features.
Usage
import { FormFlow, Checkbox, SubmitButton } from '@formflow.sh/react';
function MyForm() {
return (
<FormFlow apiKey="ff_live_xxx">
<Checkbox
name="terms"
label="I agree to the terms and conditions"
required
/>
<SubmitButton>Submit</SubmitButton>
</FormFlow>
);
}Props
| Prop | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Field name for form submission |
label | string | Yes | Label text displayed next to the checkbox |
required | boolean | No | Make the checkbox required. Default: false |
disabled | boolean | No | Disable the checkbox. Default: false |
Examples
Terms & Conditions
<Checkbox
name="terms"
label="I agree to the terms and conditions"
required
/>Newsletter Subscription
<Checkbox
name="newsletter"
label="Subscribe to our newsletter"
/>Marketing Consent
<Checkbox
name="marketing"
label="I consent to receiving marketing communications"
/>