Support specifying multiple types in an array

Author: Jean-DumCreated Sep 2, 2026Updated Sep 4, 2026
Labelshelp wantedfeature

Prerequisites

What theme are you using?

shadcn

Is your feature request related to a problem? Please describe.

Hello! I saw in the documentation that "react-jsonschema-form only supports a restricted subset of this -- nullable types, in which an element is either a given type or equal to null".

When a property type is an array of more than one type, the displayed input corresponds to the first type in the array, it is impossible to switch between available types.

It is also an issue when additionalProperties is set to true, the added additional properties type is set to null and it is impossible to switch to other types.

Describe the solution you'd like

If the property type is an array, like:

typescript
const schema: RJSFSchema = {
  type: ['string', 'number', 'boolean'],
};

Display a selector allowing to switch between those three types.

If the type isn't precised (for example when additionalProperties is set to true without specifying the schema), display a selector with all available types.

Describe alternatives you've considered

I tried to customize myself the FieldTemplate component and added a selector, but rjsf does not have anything allowing to change the type of a property, it always takes the first one in the array.

Source: rjsf-team/react-jsonschema-form