The component to insert in the FormField. Grommet will add update the form values when this field changes. Any additional properties (such as initial value) you pass to FormField will be forwarded to this component. The component may be custom as long it supports the properties of name, value, onChange (event => {}), while event has either event.value or event.target.value.
The amount of margin around the component. An object can be specified to distinguish horizontal margin, vertical margin, and margin on a particular side.
"xsmall""small""medium""large""xlarge"{
"vertical": "...",
"horizontal": "...",
"top": "...",
"bottom": "...",
"left": "...",
"right": "..."
}Validation rule when used within a grommet Form. Provide a regular expression or a function. If a function is provided, it will be called with two arguments, the value for this field and the entire value object. This permits validation to encompass multiple fields. The function should return a string message describing the validation issue, if any.
{
"dark": "white",
"light": "status-critical"
}{
"dark": "status-critical",
"light": "status-critical"
}{
"vertical": "xsmall",
"horizontal": "small"
}{
"margin": {
"vertical": "xsmall",
"horizontal": "small"
}
}{
"vertical": "xsmall",
"horizontal": "small"
}