react-formbridge
Browse documentation
Componentsv1.0.2

Generated fields

fields.name renders the correct platform field for each schema key.

  • You never manually register inputs or bind value/error state for standard fields
  • Each generated component already knows its validation, current value, hidden/disabled state, and platform renderer
  • Per-render overrides stay possible for labels, hints, placeholders, and presentation without mutating the original schema
  • When you need a fully custom DOM/native tree but still want the same schema field, move to form.fieldController(name) instead of rewriting the field as field.custom()

Props

Common generated field props available on every field component:

MethodTypeDescription
label?stringOverride the schema label for this render only
placeholder?stringOverride placeholder copy for this render only
hint?stringOverride helper copy for this render only
style?StylePropWrapper style override
classNames?SlotClassMapWeb slot class map (also available as top-level prop)
className?stringWeb only wrapper class override

Shared field override capabilities:

MethodTypeDescription
id? / testID?stringPlatform id hooks
hideLabel?booleanVisually suppress the default label
highlightOnError?booleanKeep the error message but suppress the default error chrome when false
styles?SlotStyleMapSlot style map
classNames?SlotClassMapWeb slot class map
wrapperProps? / labelProps? / hintProps? / errorProps?objectForward low-level props to the built-in renderer
renderLabel? / renderHint? / renderError?(ctx) => ReactNodeRender-hook escape hatches
renderRequiredMark?() => ReactNodeCustom required mark renderer
inputProps?objectText-like fields - forward props to the underlying input
textareaProps?objecttextarea on web
selectProps?objectselect on web
renderPicker?(ctx) => ReactNodeSelect-like fields - custom picker UI
renderOption?(option, state) => ReactNodeAsync select/autocomplete - custom option row
renderEmpty? / renderLoading?() => ReactNodeAsync select/autocomplete - empty/loading states
searchInputProps?objectPhone fields on web
renderFileIcon?(file) => ReactNodeFile fields on web
pickFiles?(ctx) => voidFile fields on native

How overrides behave

  • Schema-level builder methods define the default contract for every render of that field
  • Component props are useful for one-off copy or presentation overrides in a specific screen or section
  • Field components do not accept value/state overrides directly; validation, visibility, disabled rules, and submit lifecycle stay owned by the form runtime

Which customization path to pick

PathWhen to pick it
<fields.name />The built-in renderer already matches the input type
globalDefaults / per-field propsStructure is fine and you only need visual changes
renderPickerFor select-like fields where only the picker/modal/sheet needs to be custom
fieldController(name)The schema field type is still right, but you want to own the trigger, shell, modal, helper row, or extra surrounding UI
field.custom(defaultValue)The value shape or interaction model itself is not one of the built-in field types