CTAForm

Use CTAForm to create a form that is used to collect minimal information from users.
  • Experimental
  • Not reviewed for accessibility
import {CTAForm} from '@primer/react-brand'

Examples

Default

Component without confirm block

Using onChange & onSubmit handlers

Component props

CTAForm

nametypedefaultrequireddescription
actionstringundefinedfalseThe URL that processes the form submission
methodstringundefinedfalseThe HTTP method to submit the form with
targetstringundefinedfalseIndicates where to display the response after submitting the form.
classNamestringundefinedfalseSets a custom class

Additional props can be passed to the <form> element. See MDN for a list of props accepted by the <form> element.

CTAForm.Input

nametypedefaultrequireddescription
classNamestringundefinedfalseSets a custom class

CTAForm.Confirm

nametypedefaultrequireddescription
classNamestringundefinedfalseSets a custom class

CTAForm.Action

nametypedefaultrequireddescription
classNamestringundefinedfalseSets a custom class