Home / SelectField
This widget is a form widget which allows the user select value(s) from a list of options using radio inputs.
SelectField
is intrinsically a div
element and accepts all its attributes.
import { SelectField } from "react-simple-widgets/dist/select-field";
<SelectField name label inline options onChange />;
-
name: string
The key of the widget's value in the Formik provider
-
label?: string
-
inline?: boolean
If set to
true
, the radio options will be rendered horizontally instead of vertically. -
options?: Array<[any, any]>
The list of options for the widget. Each option is a two-element array of
[label, value]
. -
onChange?: (value: any) => void
If specified, this function is called with the selected value.