className
string
The className property sets the value of the class attribute of the element.
Wrapping component for form elements. Uses the <Stack>
component for layout and spacing.
<UnknownElementType><UnknownElementType htmlFor="text-input">First Name</UnknownElementType><UnknownElementTypeid="text-input"name="text-input"type="text"/></UnknownElementType>
Additional context can be provided alongside a form field using the <FormControlMessage>
component.
e.g. 978-0-12-409542-7
<UnknownElementType><UnknownElementType htmlFor="isbn">ISBN</UnknownElementType><UnknownElementTypeid="isbn"name="isbn"type="text"/><FormControlMessage>e.g. 978-0-12-409542-7</FormControlMessage></UnknownElementType>
The <FormControlError>
component allows an error with the field to be communicated to the user.
<UnknownElementType><UnknownElementType htmlFor="email"></UnknownElementType><UnknownElementTypearia-describedby="error"defaultValue="invalid-email-address"id="email"invalidname="email"type="email"/><FormControlError id="error">Please provide a valid email address</FormControlError></UnknownElementType>
The <FormControlError>
component allows an error with the field to be communicated to the user.
<UnknownElementType><UnknownElementType htmlFor="country">Country</UnknownElementType><UnknownElementTypearia-describedby="country_error"id="country"invalid><SelectOptionid="1-1"value="1">Country 1</SelectOption><SelectOptionid="1-2"value="2">Country 2</SelectOption></UnknownElementType><FormControlError id="country_error">Please provide a valid country</FormControlError></UnknownElementType>
The <FormControlSuccess>
component allows a success to be communicated to the user.
<UnknownElementType><UnknownElementType htmlFor="city">City</UnknownElementType><UnknownElementTypearia-describedby="success"defaultValue="success-city"id="city"name="city"successtype="text"/><FormControlSuccess id="success">Valid city added</FormControlSuccess></UnknownElementType>
The <FormControlButton>
component indicates a standalone form with one value to be submitted.
<form onSubmit={function noRefCheck() {}}><UnknownElementType><UnknownElementType htmlFor="signup">Sign-up</UnknownElementType><UnknownElementTypeid="signup"name="signup"onChange={function noRefCheck() {}}type="text"value=""/><UnknownElementType type="submit">Submit</UnknownElementType></UnknownElementType></form>
The <FormControlButton>
component can be used with select and indicates a standalone form with one value to be submitted.
<form><UnknownElementType><UnknownElementType htmlFor="subscribe">Sign-up</UnknownElementType><UnknownElementTypearia-describedby="select-success"id="subscribe"success><SelectOptionid="1-1"value="1">Option 1</SelectOption><SelectOptionid="1-2"value="2">Option 2</SelectOption></UnknownElementType><FormControlSuccess id="select-success">Subscribed successfully</FormControlSuccess><UnknownElementType type="submit">Submit</UnknownElementType></UnknownElementType></form>
block
boolean
If set to `false` component renders with `width : auto`, otherwise `width : full`.
icon
ReactNode
variant
"text" | "icon" | "textSecondary" | "textTertiary"
loading
boolean
If set to `true`, disables the button and shows a `Spinner` component in place of the child content.
iconPosition
"end" | "start"