Skip to Content
Kiva

Form Fields

Controlled KivaField inputs plus the KivaFieldDynamic IField adapter — render any Kiva field definition with validation tokens, companions, uploads and pickers.

iOSAndroid
Preview Form Fields on your device

Scan with Expo Go

Download Expo Go, then scan the QR code to preview native components.

Installation

pnpm dlx @kivacore/ui-cli add @kivacore/rn-form-fields
Required Packages(6 packages)
pnpm add @shopify/flash-list @react-native-community/datetimepicker expo-document-picker (optional) expo-image-picker (optional) @react-native-community/geolocation (optional) @react-querybuilder/core

Overview

Two layers, one package:

  • KivaField* controlled inputs — value / onChange components that work standalone (no form library). KivaFieldBase renders label, help text, errors and layout for all of them.
  • KivaFieldDynamic({ field }) — the IField adapter (web DynamicFormField counterpart). Pass a Kiva IField and it derives label (field.name), placeholder (getFieldPlaceholder), required / read-only, inline options (field.enums), validation tokens (field.validations), companion values (money currency, phone country, status sub-status / notes / follow-up) and every value conversion the native control needs (date strings ↔ Date, [start, end] ranges, expanded { id, name } records → ids + seeded options). Desktop-only editors render a read-only value instead of nothing.

Optional pickers (expo-document-picker, expo-image-picker) are loaded lazily — image / file fields offer only the sources that are installed.

Usage

import { KivaFieldDynamic } from '@/components/kiva-native/form-fields';

const field = {
  id: 'budget', slug: 'budget', name: 'Budget', type: 'field-money', validations: ['required', 'min:0']
};

<KivaFieldDynamic
  field={field}
  value={record.budget}
  record={record}
  onChange={value => setRecord(prev => ({ ...prev, budget: value }))}
  onCompanionChange={(key, value) => setRecord(prev => ({ ...prev, [key]: value }))} />
import { KivaFieldText, KivaFieldRelation } from '@/components/kiva-native/form-fields';

<KivaFieldText name="title" label="Title" value={title} onChange={setTitle} validationTokens={['required', 'maxLength:80']} />

<KivaFieldRelation
  name="account"
  label="Account"
  enumOptions={accounts}
  value={accountId}
  onChange={setAccountId}
  onSearch={searchAccounts}
  onCreateRecord={async name => createAccount(name)}
  onExpand={option => router.push(`/accounts/${option.id}`)} />

KivaFieldDynamic

Two modes:

  • IField mode — KivaFormFieldProps (below).
  • Legacy mode — fieldType + the controlled KivaField* props (KivaFieldDynamicLegacyProps). Kept for existing code.

KivaFormFieldProps

PropTypeDefaultDescription
fieldIField—Field definition (required)
valueunknown—Controlled value (API shape — ids, ISO strings, StoredFileValue, …)
onChange(value: unknown) => void—Called with the next value in the API shape
onBlur / onFocus() => void—Focus handlers
recordRecord<string, unknown>—Companion values keyed by companion slug (__<slug>_currency, __<slug>_country, __<slug>_secondary, …) — usually the whole record
onCompanionChange(key: string, value: unknown) => void—Companion change (key = full companion slug)
disabledboolean—Disable the input
requiredbooleanfrom field.validationsLabel asterisk + required validation
readOnlybooleanfrom field.readOnlyForce read-only
errorstring—External error
descriptionstring—Help text below the field
labelstringfield.nameLabel override
enumOptionsEnumOption[]field.enumsOptions for select-based fields
appSlug / dataSourceSlugstring—Dynamic enum loading context
onLoadMore / hasMore() => void / boolean—Picker pagination
onSearch / searching(query) => void / boolean—Remote search
onCreateRecord(name: string) => Promise<EnumOption>—Relation: create from the search text
renderCreateForm({ onCreated }) => ReactNode—Relation: custom inline create form
itemTemplate(option: EnumOption) => ReactNode—Custom option rendering
variant'dropdown' | 'card''dropdown'Card list for select / radio / relation; field-multiSelect + card renders a checkbox group
columnCount1 | 2 | 3 | 4 | 5—Card columns (clamped to 2 on phones)
onImageUpload / onFileUploadFieldUploadHandler—(file: NativeFile) => Promise<StoredFileValue | null>
onExpand(option: EnumOption) => void—Relation expand button
renderExpandContent(option: EnumOption) => ReactNode—Relation expand content (bottom sheet)
expandIconReactNode—Custom expand glyph
onComposeEmail(email: string) => void—Email compose button
onSendMessage(phone: string) => void—Phone send-message button
clientRestApiClient—Email / phone fields: open EmailComposeDialog / InstantMessageComposeDialog. onComposeEmail / onSendMessage win when set
aiAssistantboolean—Reserved (not yet on native)
renderOptionsEditor() => ReactNode—Enum "Manage options" footer inside the picker sheet (field-enum / field-systemEnum; filled by useKivaFormView({ enumEditor }))
size'sm' | 'md' | 'lg''md'Field size
fieldVariant'default' | 'filled' | 'outlined''default'Input chrome
labelAlignment'top' | 'left' | 'right''top'Label placement
showLabelbooleantrueRender the label
clearablebooleantrueClear affordance on optional pickers
autoOpenboolean—Open the picker on mount
onPickerClose() => void—Picker sheet closed
validationTokensstring[] | nullfield.validationsToken list to enforce; null disables
validationsKivaFieldValidationRule[]—Extra object rules
classNamestring—Container class

Field type → native control

IFieldTypeControl
field-text / -textarea / -email / -url / -passwordKivaFieldText / Textarea / Email / Url / Password
field-codeKivaFieldCode (single-line monospace)
field-codeEditor / -json / -jsonata / -handlebarsKivaFieldCode (multiline, json parses)
field-markdownKivaFieldMarkdown (SimpleMarkdownEditor: toolbar + Write / Preview)
field-number / -percent / -money / -duration / -ratingNumber / Percent / Money (+ currency companion) / Duration (options.editorOptions.increment/maxHours) / Rating (field.maxRating)
field-checkbox / -switch / -sliderCheckbox / Switch / Slider
field-phonePhone (__<slug>_country, legacy country_code)
field-color / -icon / -currencyColor / Icon / CurrencyCode
field-select / -enum / -systemEnumSelect / Enum; field.nested → KivaFieldTreeSelect
field-radioGroup / -statusRadioGroup (RadioGroup options, variant: 'card', columnCount 1–5) / Status (+ sub-status, notes, follow-up)
field-userSelect / -userMultiSelect / -relationUser pickers / Relation (itemMapping, nested, create, expand)
field-multiSelect / -tagSelectMultiSelect (variant: 'card' → CheckboxGroup) / TagSelect
field-date / -dateTime / -time / -dateRangeDate (YYYY-MM-DD) / Datetime (ISO) / Time (HH:mm) / DateRange ([start, end])
field-file / -image / -avatarFile / Image (options.gallery, options.maxImages) / Avatar (AvatarSelect; reads + writes the three field.avatarMapping columns through record / onCompanionChange)
field-queryBuilderKivaFieldQueryBuilder (sheet with QueryBuilderKiva)
field-schemaRepeaterKivaFieldSchemaRepeater (options.schema, maxItems, …)
field-taskList / -locationSelect / -approvalStatus / -uploadTaskList / LocationSelect / ApprovalStatus / Upload
field-htmlEditor / -docEditor / -emailEditor / -jsonSchema / -adaptiveCard / -dsqlKivaFieldReadOnlyValue + "edit on web" hint
computed (field-formula, -identity, -autonumber, …)KivaFieldReadOnlyValue

Base Props (KivaFieldBaseProps)

PropTypeDefaultDescription
namestring—Field identifier (required)
labelstring—Label text
placeholderstring—Placeholder
helpTextstring—Helper text below the field
requiredbooleanfalseAsterisk + required validation (always enforced)
disabledbooleanfalseDisable interaction
readOnlybooleanfalsePrevent editing
hiddenbooleanfalseRender nothing
size'sm' | 'md' | 'lg''md'Size
variant'default' | 'filled' | 'outlined''default'Input chrome
labelAlignment'top' | 'left' | 'right''top'Label placement
showLabelbooleantrueRender the label
validationsKivaFieldValidationRule[]—Object rules (required, min, max, pattern, custom async)
validationTokensstring[] | null—IField token DSL — see Validation tokens
clearablebooleanpicker-dependentClear ("×") affordance when the value is set and the field is optional
autoOpenboolean—Open the picker sheet on mount (used by EditableValue)
onPickerClose() => void—Called when the picker sheet closes
errorstring—External error (shown immediately)
className / labelClassName / errorClassName / helpTextClassNamestring—Class overrides

Value Props (KivaFieldProps<V>)

PropTypeDescription
valueVControlled value
onChange(value: V) => voidChange handler
onBlur() => voidBlur handler
onFocus() => voidFocus handler

Validation tokens

IField.validations is a flat token list — required, minLength:N, maxLength:N, pattern:RE, min:N, max:N — enforced by the same validateValidationTokens module the web form engine uses (synced copy). Empty values only fail required; length bounds apply to strings and arrays; range bounds to numbers; unknown tokens and malformed bounds are ignored. Tokens run after the object validations rules.

import { validateValidationTokens, parseValidationTokens } from '@/components/kiva-native/form-fields';

validateValidationTokens('ab', ['required', 'minLength:3'], { label: 'Code' });
// → 'Code must be at least 3 characters'

Select-Based Fields

Select Props (KivaFieldSelectProps<V>)

PropTypeDefaultDescription
enumOptionsEnumOption[][]Options ({ id, name, color?, icon?, parent?, description? })
searchablebooleantrueSearch box in the sheet (shown with > 5 options or remote search)
searchPlaceholderstringui.formField.searchPlaceholderSearch placeholder
onSearch / searching(query) => void / boolean—Remote search
onLoadMore / hasMore() => void / boolean—Pagination (end-reached)
itemTemplate(option) => ReactNode—Custom option + selected rendering
displayVariant'dropdown' | 'card''dropdown'Inline card list instead of trigger + sheet
columnCount1 | 2 | 3 | 4 | 52Card columns (max 2 on phones)

Options with both icon and color render as a solid chip (shouldRenderEnumOptionChip) using the WCAG-contrast badge colors (getEnumBadgeColors).

KivaFieldSelect / KivaFieldEnum

KivaFieldEnum also accepts renderOptionsEditor?: () => ReactNode — rendered below the option list in the picker sheet.

Single-select storing the option id. KivaFieldEnum also serves field-systemEnum. Clearing writes ''.

KivaFieldTreeSelect

Single-select over nested options (parent / nestedByProp), indented tree in a searchable sheet.

PropTypeDefaultDescription
nestedByPropstring'parent'Parent-reference property

KivaFieldMultiSelect / KivaFieldTagSelect / KivaFieldUserMultiSelect

Multi-select storing string[] ids. Selected options render as chips; KivaFieldMultiSelect / KivaFieldUserMultiSelect show a clear affordance.

KivaFieldCheckboxGroup

Checkbox list storing string[] ids (web CheckboxGroupFormField). displayVariant="card" renders bordered cards with the option description and icon.

KivaFieldRadioGroup

PropTypeDefaultDescription
Renders the options-driven RadioGroup (web RadioGroupFormField parity). Options map id → value, name → label, plus description / icon / color. Picking the selected option again no longer clears it (web parity). A custom itemTemplate falls back to the select-style card list.
PropTypeDefaultDescription
direction'vertical' | 'horizontal''vertical'Orientation of the default layout (when columnCount is 1)
displayVariant'dropdown' | 'card'—card → bordered option cards; anything else → default radio list
columnCount1 | 2 | 3 | 4 | 51Grid columns — 1 below 400pt window width, max 2 below 768pt

KivaFieldUserSelect

Avatar + name rows (option photo / avatar / image icon and email shown when present).

KivaFieldRelation

PropTypeDefaultDescription
nested / nestedByPropboolean / string— / 'parent'Tree options
itemMapping{ iconField?, colorField?, imageField?, descriptionField? }—Map record columns onto the row visuals
onCreateRecord(name: string) => Promise<EnumOption>—"Create "query"" row in the sheet
renderCreateForm({ onCreated }) => ReactNode—Custom create form inside the sheet
onExpand(option) => void—Expand button next to the selection
renderExpandContent(option) => ReactNode—Expand content in a bottom sheet
expandIconReactNode—Custom expand glyph

Selecting the current record again clears it (web parity).

KivaFieldStatus

PropTypeDefaultDescription
companionValuesStatusCompanionValues{}{ secondary?, description?, followup_date? }
onCompanionChange(key: StatusCompanionKey, value: string | null) => void—Enables the companion form: sub-status (child options), notes, follow-up date; committed on Confirm
inlinebooleanfalseStatus list + companion form inline (no sheet)

Options flagged force_description / force_followup_date require notes / a date before Confirm; is_final_option shows a "Final" tag.

KivaFieldCurrencyCode

Searchable ISO currency picker storing the code.

PropTypeDefaultDescription
currencies{ code, name }[]COMMON_CURRENCIESCurrency list

Text & Code Fields

KivaFieldText

PropTypeDefaultDescription
autoCapitalize'none' | 'sentences' | 'words' | 'characters''sentences'Auto-capitalization
autoCorrectbooleantrueAuto-correct
autoCompletestring'off'Autofill hint
keyboardTypestring'default'Keyboard
returnKeyTypestring'done'Return key
maxLengthnumber—Max characters
secureTextEntrybooleanfalseMask input
selectTextOnFocusbooleanfalseSelect on focus
clearButtonMode'never' | 'while-editing' | 'unless-editing' | 'always''while-editing'iOS clear button
onSubmitEditing() => void—Return pressed
leftIcon / rightIconReactNode—Adornments

KivaFieldTextarea

PropTypeDefaultDescription
numberOfLinesnumber4Visible lines
maxLengthnumber—Max characters
autoCapitalize'none' | 'sentences' | 'words' | 'characters''sentences'Auto-capitalization
autoCorrectbooleantrueAuto-correct
minHeight / maxHeightnumber80 / —Height bounds

KivaFieldCode

Monospace editor for code / JSON / JSONata / Handlebars (no syntax highlighting).

PropTypeDefaultDescription
language'text' | 'json' | 'jsonata' | 'handlebars' | 'sql' | 'javascript' | 'html''text'json parses on change (invalid JSON → inline error)
singleLinebooleanfalseSingle-line mode
minHeight / maxHeightnumber120 / —Height bounds

KivaFieldMarkdown

Wraps the native SimpleMarkdownEditor (web MarkdownEditorFormField parity): formatting toolbar, Write / Preview tabs, optional stats footer. The value is the markdown string. The toolbar is hidden when the field is disabled / read-only.

PropTypeDefaultDescription
toolbarbooleantrueShow the formatting toolbar
showStatsbooleanfalseWords / characters footer
resizableboolean—Accepted for web parity — ignored on native
autoResizebooleanfalseGrow with the content between minHeight and maxHeight
minHeightnumber | string220Minimum editor height
maxHeightnumber | string | null—Maximum editor height
previewboolean | 'toggle''toggle''toggle' → Write / Preview tabs, true → preview below the input, false → no preview

KivaFieldEmail

PropTypeDefaultDescription
onComposeEmail(email: string) => void—Compose button once the value is a valid address
clientRestApiClient—Without onComposeEmail: the button opens EmailComposeDialog

KivaFieldPhone

PropTypeDefaultDescription
countryCodestring—Prefix shown before the number
onSendMessage(phone: string) => void—Message button (receives country code + number)
clientRestApiClient—Without onSendMessage: the button opens InstantMessageComposeDialog

KivaFieldPassword

PropTypeDefaultDescription
showStrengthbooleanfalseStrength bar
minLengthnumber—Strength threshold
maxLengthnumber—Max characters

KivaFieldUrl

No extra props (url keyboard).

Numeric & Boolean Fields

KivaFieldNumber

Keeps the raw text while typing (partial decimals like 12. survive), accepts , or . as the decimal separator, clamps / rounds on blur.

PropTypeDefaultDescription
min / maxnumber—Clamp on blur
decimalPlacesnumber—Round on blur

KivaFieldPercent

PropTypeDefaultDescription
decimalPlacesnumber—Decimal places

KivaFieldMoney

PropTypeDefaultDescription
currencystring'USD'Currency code
onCurrencyChange(currency: string) => void—Enables the currency sheet
currencyOptions{ code, name }[]COMMON_CURRENCIESCurrencies

KivaFieldDuration

Value in seconds.

PropTypeDefaultDescription
showSecondsbooleanfalseSeconds input
maxHoursnumber23Hour clamp
incrementnumber—Minute step (snaps entered minutes)

KivaFieldRating

PropTypeDefaultDescription
maxRatingnumber5Stars

KivaFieldCheckbox / KivaFieldSwitch / KivaFieldSlider

PropTypeDefaultDescription
checkboxLabel / checkboxPositionstring / 'left' | 'right'— / 'left'Checkbox
switchLabel / switchPositionstring / 'left' | 'right'— / 'right'Switch
onColor / offColor / thumbColorstring—Switch colors
min / max / stepnumber0 / 100 / 1Slider range
showValue / showMinMax / showTooltipbooleantrue / false / trueSlider display
formatValue(value: number) => string—Slider label format
tintColorstring—Slider tint

Date & Time Fields

Date / datetime / date-range triggers use the tenant format when a DateFormatProvider (e.g. KivaTenantProvider) is mounted, else the picker preset.

KivaFieldDate / KivaFieldDatetime

PropTypeDefaultDescription
valueDate | nullnullValue (the IField adapter converts YYYY-MM-DD / ISO strings)
mode'date' | 'datetime' | 'time''date'Picker mode (KivaFieldDatetime fixes datetime)
minimumDate / maximumDateDate—Bounds
dateFormat'short' | 'medium' | 'long' | 'full''medium'Fallback format preset
timeFormat'12h' | '24h''12h'Fallback time format
clearablebooleantrueClear button (hidden when required / locked)
calendarIcon / clearIconReactNode—Custom icons
iconSize / iconColornumber / string20 / —Icon styling

KivaFieldTime

Value HH:mm string.

KivaFieldDateRange

PropTypeDefaultDescription
value{ startDate: Date | null; endDate: Date | null }—Range (adapter converts [start, end])
minimumDate / maximumDateDate—Bounds
dateFormat'short' | 'medium' | 'long' | 'full''medium'Fallback format
separatorstring' – 'Separator
clearablebooleantrueClear button
allowSameDatebooleantrueAllow start = end
calendarIcon / clearIcon / iconSize / iconColor——Icons

Files & Media

Values follow the Kiva StoredFileValue contract: { file_name, source, file_size, file_type, signed_url, file_data? }. Pickers resolve a NativeFile ({ uri, name, type, size? }) that is handed to the upload handler; without one the field stores a local StoredFileValue pointing at the picked URI.

KivaFieldImage

PropTypeDefaultDescription
valueStoredFileValue | StoredFileValue[] | null—Image(s)
onImageUpload(file: NativeFile) => Promise<StoredFileValue | null>—Upload handler
onImageDelete(image: StoredFileValue) => Promise<void> | void—Called on remove
onPickImage() => Promise<NativeFile | null | void>—Custom picker
gallerybooleanfalseMultiple images (horizontal strip)
maxImagesnumber—Gallery limit
stencilShape'rectangle' | 'circle''rectangle'Thumbnail shape
thumbWidth / thumbHeightnumber112 (88 gallery) / 88Thumbnail size

KivaFieldFile

PropTypeDefaultDescription
valueStoredFileValue | null—File
onFileUploadFieldUploadHandler—Upload handler
onPickFile() => Promise<NativeFile | null | void>—Custom picker
acceptstring[]—MIME filters

KivaFieldAvatar

PropTypeDefaultDescription
Renders the native AvatarSelect (icon / emoji / color / image) — web AvatarField parity.
PropTypeDefaultDescription
valueAvatarFieldValue ({ icon, color, image: AvatarImageValue | null })—Avatar
iconField / colorField / imageFieldstring | nullicon / color / imageColumn mapping used for the payload
onPayloadChange(payload: Record<string, unknown>, value: AvatarFieldValue) => void—Mapped buildAvatarPayload columns on every change
uploadImage(asset: AvatarUploadAsset) => Promise<AvatarImageValue>—Uploads the picked / cropped image
onImageUploadFieldUploadHandler—Kiva storage upload (used when uploadImage is absent); the stored file becomes value.image
editorDisplay'inline' | 'popover''popover'Editor in an ActionSheet from the thumbnail, or in place
imageCrop'system' | 'editor''system'OS crop UI or the native ImageEditor

KivaFieldUpload

Native multi-file field (UploadedFile[]).

PropTypeDefaultDescription
maxFilesnumber10Max files
maxSizeBytesnumber—Size limit
allowedTypesstring[]—MIME filters
onUpload(files: UploadedFile[]) => Promise<void>—Upload callback
uploadLabelstring—Button label

Complex Fields

KivaFieldApprovalStatus

Approval workflow (web parity): last-response summary, optional comments, status-dependent actions (Send for approval → Approve / Reject / Request revision → Resend / Withdraw) and response history. Each action prepends a step.

PropTypeDefaultDescription
valueApprovalValueObject | string | null—Workflow value (bare status strings accepted)
canRespondbooleantrueAllow Approve / Reject / Request revision
currentUserApprovalUserSnapshot | nullnullStamped on every step
commentPlaceholderstring—Comment placeholder

KivaFieldQueryBuilder

Summary trigger → full-height sheet with QueryBuilderKiva; commits on Apply. Value: react-querybuilder RuleGroupType (JSON strings accepted).

PropTypeDefaultDescription
fieldsKivaQBField[]from enumOptionsQuery builder fields
enumOptionsEnumOption[]—One text field per option when fields is omitted

KivaFieldSchemaRepeater

Repeatable group of sub-fields rendered through KivaFieldDynamic; key / value mode without schema.

PropTypeDefaultDescription
valueSchemaRepeaterRowValue[] | null—Rows ({ id, ... })
schemaIField[]—Sub-fields
schemaEnumOptionsRecord<string, EnumOption[]>—Options per sub-field slug
minItems / maxItemsnumber0 / —Bounds
collapsible / defaultCollapsedbooleantrue / falseCollapsing
cloneablebooleanfalseDuplicate action
sortablebooleantrueMove up / down
showHeaderbooleantrueCard header per row
itemLabel(item, index) => string#nRow label
addLabelstringui.schemaRepeater.addAdd button label

KivaFieldReadOnlyValue

Read-only fallback (KivaValueDynamic inside the field chrome).

PropTypeDefaultDescription
fieldIField—Field definition
recordRecord<string, unknown>—Companion values
enumOptionsEnumOption[]—Options
hintstring | null"Editing is available on the web app."Hint below the value; null hides

KivaFieldContactChannels

Stores a ContactChannel[] on the bound field and edits it inline with the backend-agnostic ContactChannelsManager (web ContactChannelsFormField). For live API-backed management use ContactChannelsPanel.

PropTypeDefaultDescription
valueContactChannel[]—Channels
brandsContactBrand[]—Brands for labelling / scoping consent
enableConsentbooleantruePer-channel consent editor
enableValidationbooleantrueValidation status chips
groupByKindbooleantrueGroup channels under kind headers

KivaFieldColor / KivaFieldIcon / KivaFieldTaskList / KivaFieldLocationSelect / KivaFieldHidden

ComponentExtra props
KivaFieldColor— (palette sheet)
KivaFieldIcon— (featured icons + exact key)
KivaFieldTaskListvalue TaskItem[] ({ id, title, completed })
KivaFieldLocationSelectallowCurrentLocation (true), showCoordinates (true), predefinedLocations, requestLocationPermission, googleMapsApiKey
KivaFieldHiddenname, value, onChange

Utilities

ExportDescription
getFieldPlaceholder(field, fallback?)placeholder → options.placeholder → fallback
shouldRenderEnumOptionChip(option)icon + color → solid chip
getEnumBadgeColors(color)Solid background + WCAG readable text ({ style })
getEnumColorValue(color)Any color format → rgb(...)
getEnumBadgeColorsNative(color, isDark, theme) / getEnumDotColorNativeTheme-aware variants
toLocalDateString(date)Timezone-safe YYYY-MM-DD
parseDuration(text)HH:MM:SS, HH:MM (two parts = hours:minutes) or seconds
formatDateRange(start, end, formatDate?)Range text (tenant formatter optional)
validateValidationTokens / parseValidationTokens / readToken / DEFAULT_VALIDATION_MESSAGESToken DSL
canClearValue / ClearFieldButtonShared clear affordance
EnumOptionDisplayShared option display (chip / inline)
extractEnumOptions / toIField / getFieldValue / normalizeOptionValue / resolveOptionNameIField helpers
normalizeApprovalValue / toApprovalStatusCode / APPROVAL_STATUSApproval helpers
normalizeStoredFiles / toLocalStoredFile / getStoredFileNameFile value helpers
FORM_FIELD_MAPField type → controlled component
SelectModalShared option sheet

Components

ComponentDescription
KivaFieldBaseLabel / error / help-text wrapper
KivaFieldDynamicIField adapter + legacy dispatcher
KivaFieldText, KivaFieldTextarea, KivaFieldCode, KivaFieldMarkdown, KivaFieldEmail, KivaFieldUrl, KivaFieldPasswordText
KivaFieldNumber, KivaFieldPercent, KivaFieldMoney, KivaFieldDuration, KivaFieldRating, KivaFieldSliderNumeric
KivaFieldCheckbox, KivaFieldSwitch, KivaFieldCheckboxGroupBoolean
KivaFieldSelect, KivaFieldEnum, KivaFieldTreeSelect, KivaFieldMultiSelect, KivaFieldTagSelect, KivaFieldRadioGroup, KivaFieldStatus, KivaFieldUserSelect, KivaFieldUserMultiSelect, KivaFieldRelation, KivaFieldCurrencyCodeSelection
KivaFieldDate, KivaFieldDatetime, KivaFieldTime, KivaFieldDateRangeDate / time
KivaFieldFile, KivaFieldImage, KivaFieldAvatar, KivaFieldUploadFiles
KivaFieldPhone, KivaFieldContactChannels, KivaFieldColor, KivaFieldIcon, KivaFieldTaskList, KivaFieldLocationSelect, KivaFieldApprovalStatus, KivaFieldQueryBuilder, KivaFieldSchemaRepeater, KivaFieldReadOnlyValue, KivaFieldHiddenOther

Type Exports

TypeDescription
IField, IFieldType, EnumOptionKiva field contract (web parity)
KivaFormFieldPropsIField adapter props
StoredFileValue, NativeFile, FieldUploadHandlerUpload contract
CustomValidationRule, ComputedBooleanFormula, FieldAction, FieldActionBlock, FieldActionBlockItem, FieldActionStep, FieldActionCondition, FieldActionPropertyOverrides, FormAction, FormActionTriggerType, FormCustomValidationRuleForm-engine types (web parity)
KivaFieldBaseProps, KivaFieldProps<V>, KivaFieldSelectProps<V>, KivaFieldMultiSelectProps, KivaFieldRenderProps<V>, KivaFieldValidationRule, KivaFieldSize, KivaFieldVariant, KivaFieldLabelAlignmentControlled field props
KivaFieldDynamicProps, KivaFieldDynamicLegacyPropsDispatcher props
StatusCompanionKey, StatusCompanionValuesStatus companions
ApprovalStatusValue, ApprovalValueObject, ApprovalStepValue, ApprovalUserSnapshot, ApprovalWorkflowStatusApproval
KivaFieldContactChannelsPropsContact-channels field props
ImageFieldValue, FileFieldValue, AvatarFieldValue, SchemaRepeaterRowValue, KivaFieldDateRangeValue, TaskItem, LocationInfo, UploadedFileField values
ValidationTokenName, ValidationConstraints, ValidationMessages, ValidateTokensOptionsToken DSL
KivaFieldCodeLanguage, EnumColorResult, KivaFieldLike, SelectModalPropsMisc

Breaking changes (web-parity release)

  • Enum / select values are option ids (already fixed in the hotfix release).
  • KivaFieldFile / KivaFieldImage values are StoredFileValue (file_name, file_size, file_type, signed_url) — the legacy { name, mime_type, size, uri } shape is still read but no longer written. onPickImage / onPickFile / onPickAvatar now resolve a NativeFile.
  • KivaFieldApprovalStatus writes the web ApprovalValueObject with uppercase statuses (WAITING_FOR_APPROVAL, …); lowercase strings are read.
  • KivaFieldCurrencyCode is a picker (was a 3-letter text input).
  • parseDuration('1:30') returns 5400 (HH:MM), not 90.
  • getEnumBadgeColorsNative returns solid colors with WCAG text instead of pastel tints.
  • KivaFieldBase enforces required even without an explicit rule.
  • KivaFieldAvatar renders AvatarSelect; its value is the lib AvatarFieldValue (image is an AvatarImageValue object, not a URL string) and onPickAvatar was removed (use uploadImage / onImageUpload). Through KivaFieldDynamic it edits the three avatarMapping columns instead of its own slug.
  • KivaFieldMarkdown wraps SimpleMarkdownEditor; the textarea props (numberOfLines, maxLength, …) and defaultPreview were removed (use preview).
  • KivaFieldRadioGroup renders RadioGroup; re-selecting the active option no longer clears the value.
  • Copy moved from embedded en / tr maps to useUiTranslation() keys (ui.formField.*, ui.formFields.*, ui.common.*).

On this page