Skip to main content

FormSelect

FormSelect binds a dropdown to a Formik field. It stores the option's valueField value and displays its labelField text.

<FormSelect
name="language"
context={FormikContext}
label="Language"
options={[
{ label: "English", value: "en_US" },
{ label: "Deutsch", value: "de_DE" },
]}
labelField="label"
valueField="value"
/>

Use the onChange callback for app-specific side effects, while treating Formik as the owner of the selected field value. The control supports the underlying dropdown props except its data, change, blur, and placeholder props, which the helper manages.