Radio

RadioButton field is a input wrapper form field that can be used with in FormSchema.


Usage

import { ItsyForm } from '@itsy-ui/form';

const formSchema = {
  "id": "sample-form",
  "displayName": "Sample form",
  "typeId": "form",
  "propertyDefinitions": {
    "gender": {
      "id": "gender",
      "displayName": "Gender",
      "propertyType": "string",
      "updatability": "readwrite",
      "ui:widget": "radio",
      "required": true,
      "value": [
        {
          "key": "male",
          "value": "Male"
        },
        {
          "key": "female",
          "value": "Female"
        }
      ]
    }
  }
}

const schema = {
  typeId: "sample_form",
  formSchema: formSchema
};

<ItsyForm className="form" schema={schema} />


API

name type default description
className String '' additional class name of root node.
mode String mode for the form field in ui horizontal/vertical .
displayName String Field display name that renders in the form.
required Boolean Specifies if the form field is required or not.
Value Array Radio button display the option



Compatibility

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Electron
Electron
Edge last 2 versions last 2 versions last 2 versions last 2 versions