import {CTAForm} from '@primer/react-brand'
<CTAForm><CTAForm.Input><FormControl required><FormControl.Label>Your work email address</FormControl.Label><TextInput placeholder="name" /></FormControl></CTAForm.Input><CTAForm.Confirm><FormControl required><FormControl.Label><Text size="300" variant="muted">I agree to the{' '}<InlineLink href="www.github.com">Privacy Policy</InlineLink> and{' '}<InlineLink href="www.github.com">Terms of Service</InlineLink></Text></FormControl.Label><Checkbox name="confirm" /></FormControl></CTAForm.Confirm><CTAForm.Action>Subscribe</CTAForm.Action></CTAForm>
<CTAForm><CTAForm.Input><FormControl required><FormControl.Label>Your work email address</FormControl.Label><TextInput placeholder="name" /></FormControl></CTAForm.Input><CTAForm.Action>Subscribe</CTAForm.Action></CTAForm>
<CTAForm onSubmit={() => alert('onSubmit event triggered')}><CTAForm.Input onChange={() => console.log('onChange event triggered')}><FormControl required><FormControl.Label>Your work email address</FormControl.Label><TextInput placeholder="name" /></FormControl></CTAForm.Input><CTAForm.Action>Subscribe</CTAForm.Action></CTAForm>
name | type | default | required | description |
---|---|---|---|---|
action | string | undefined | false | The URL that processes the form submission |
method | string | undefined | false | The HTTP method to submit the form with |
target | string | undefined | false | Indicates where to display the response after submitting the form. |
className | string | undefined | false | Sets a custom class |
Additional props can be passed to the <form>
element. See MDN for a list of props accepted by the <form>
element.
name | type | default | required | description |
---|---|---|---|---|
className | string | undefined | false | Sets a custom class |
name | type | default | required | description |
---|---|---|---|---|
className | string | undefined | false | Sets a custom class |
name | type | default | required | description |
---|---|---|---|---|
className | string | undefined | false | Sets a custom class |