Data fields

Reusable form fields ported from the KRXCore and iOS components. Every example uses synthetic data; nothing is sent to a server. Values are shown with their runtime types.

Off shows every main example in display-only mode, like the iOS edit binding.

Text and identifiers

Free text, case-normalized identifiers, and multiline notes. Identifiers stay strings so leading zeros survive.

TextField

Single-line text with the iOS L-shaped stroke, required/validated asterisks, helper and error text.

iOS
  • Field KRXCore-iOS/Source/UIUX/Views/Fields/Field.swift
  • EditField KRXCore-iOS/Source/UIUX/Views/Fields/EditField.swift

Interactive example

States

Shown on invoices.

This field is required.

TextField (identifier)

Identifiers such as RFC, CLABE, or internal codes: uppercase while typing, no autocorrect, kept as strings.

iOS
  • Field(sensitivity: .upper) iOS/Shared/Views/CorporateProfile/Form/CorporateProfileForm.swift

iOS has no dedicated identifier field; it configures the generic Field with a CaseFormatter.

Interactive example

Uppercase while typing.

Leading zeros are preserved.

TextAreaField

Multiline descriptions and notes with an optional character counter.

iOS
  • Field iOS/Shared/Views/CorporateProfile/Form/CorporateProfileForm.swift

iOS uses the single-line Field for messages and notes; there is no multiline component.

Interactive example

53 / 280 characters

States

Email and phone

Contact fields are text with the right keyboard and autofill hints. Phone numbers stay strings so + and leading zeros survive.

TextField (type: email)

Email with email keyboard, autofill, and no autocapitalization. Format checks are advisory; the Backend verifies.

iOS
  • Field + .keyboardType(.emailAddress) iOS/Shared/Views/Client/Form/ClientFormView.swift

iOS has no email component; forms set the keyboard type on the generic Field.

Interactive example

States

Enter an email such as name@example.com.

TextField (type: tel)

Phone numbers as strings with the telephone keypad and autofill.

iOS
  • Field + .keyboardType(.phonePad) iOS/Shared/Views/Client/Form/ClientFormView.swift

iOS has no phone component; forms set the keyboard type on the generic Field.

Interactive example

Password

Secret text with a reveal toggle and password-manager hints.

PasswordField

Masked input with an accessible Show/Hide toggle (aria-pressed).

iOS
  • Field(isSecured: true) KRXCore-iOS/Source/UIUX/Views/Fields/Field.swift

iOS uses SecureField inside the generic Field; there is no dedicated password component.

Interactive example

At least 12 characters.

States

Numbers

Integers and decimals stay typed as numbers. Empty input is null, never zero, and intermediate text such as 12. is preserved while typing.

NumberField (mode: integer)

Whole numbers with the iOS plus/minus stepper. ArrowUp/ArrowDown step from the keyboard.

iOS
  • NumericField iOS/Shared/Views/Components/Fields/NumericField.swift
  • EditNumericField iOS/Shared/Views/Components/Fields/EditNumericField.swift

Interactive example

States

Must be at most 500.

NumberField (mode: decimal)

Decimal input with a decimal keyboard and an optional limit on decimal places.

iOS
  • NumberField KRXCore-iOS/Source/UIUX/Views/Fields/Number/NumberField.swift

Interactive example

Up to 2 decimal places.

States

Money and percentage

Money always carries an explicit ISO 4217 currency. Percentages document their storage scale.

MoneyField

Amount plus currency code. Decimal places follow the currency (MXN 2, JPY 0), and display mode formats with Intl.

iOS
  • NumberField(numberStyle: .currency) iOS/Shared/Views/Finances/Expense/AddExpenseView.swift

iOS has no money component: it uses the generic NumberField and hardcodes MXN in NumberFormatter.

Interactive example

States

USD
JPY

PercentField

Percent input shown in points (12.5 = 12.5 %), stored as points (0–100, the iOS convention) or as a fraction (0–1).

iOS
  • Field + .keyboardType(.decimalPad) iOS/Shared/Views/CorporateProfile/Form/CorporateProfileForm.swift

iOS has no percent component; CorporateProfileForm binds a text Field and clamps to 0…100.

Interactive example

%
%

States

%

Must be at most 100.

%

Dates and times

Plain dates (YYYY-MM-DD) and times (HH:mm) carry no timezone. Date/time values are UTC ISO 8601 instants edited in the viewer's timezone. Optional values are null until set.

DateTimeField (kind: date)

Required and optional calendar dates using the native date input.

iOS
  • EditDateField KRXCore-iOS/Source/UIUX/Views/Fields/Date/EditDateField.swift
  • DateTimePicker KRXCore-iOS/Source/UIUX/Views/Fields/Date/DateTimePicker.swift

Interactive example

States

Choose a date.

DateTimeField (kind: time | datetime)

Wall-clock times and absolute date/time instants.

iOS
  • DateField KRXCore-iOS/Source/UIUX/Views/Fields/Date/DateTimeField.swift
  • DateTimePicker KRXCore-iOS/Source/UIUX/Views/Fields/Date/DateTimePicker.swift

Interactive example

Times are in your local timezone.

States

Boolean toggle

On/off values rendered as an accessible switch.

ToggleField

The iOS pill toggle: off (✕) and on (✓) icons, knob sliding to the active side. Space or Enter toggles it; so does clicking the label.

iOS
  • PillToggleStyle KRXCore-iOS/Source/UIUX/Views/Toggle/PillToggleStyle.swift

Interactive example

States

Applies to new invoices only.

Single selection

Enums, categories, statuses, and units with a typed value or null.

SelectField

Native select inside the field chrome. Typed as the option union (`T | null`).

iOS
  • CasePicker KRXCore-iOS/Source/UIUX/Views/Fields/Case/CasePicker.swift
  • EditValuePicker KRXCore-iOS/Source/UIUX/Views/EditValuePicker.swift

Interactive example

States

Choose a category.

SelectField (appearance: capsule)

The compact ValuePicker look: title on the left, the value in a stroked capsule.

iOS
  • ValuePicker KRXCore-iOS/Source/UIUX/Views/Toggle/ValuePicker.swift

Interactive example

Related records

Reference another record by id. Options come from the caller; the catalog uses synthetic, local mock records only.

RecordPickerField

Searchable combobox. Type to filter (case- and accent-insensitive), ArrowDown/ArrowUp to move, Enter to select, Escape to close.

iOS
  • OptionsFieldLink iOS/Shared/Views/Components/Fields/OptionsFieldLink.swift
  • EditOptionsFieldLink iOS/Shared/Views/Components/Fields/EditOptionsFieldLink.swift
  • CardStringList iOS/Shared/Views/Card/CardStringList.swift

iOS has no single record picker: it shows the value in a field-like row and navigates to a .searchable list.

Interactive example

States

Choose a client.

Puebla · Food service

Address and location

Structured postal addresses and geographic coordinates.

AddressField

Street, numbers, neighborhood, postal code, city, state, and country as separate strings with autofill tokens.

iOS
  • Field × 6 iOS/Shared/Views/CorporateProfile/Form/CorporateProfileForm.swift

iOS has no address component; CorporateProfileForm stacks Fields in Address and Location cards.

Interactive example

Fiscal address (required)

LocationField

Latitude/longitude with range validation and an optional “Use current location” action.

iOS
  • MapPicker iOS/Shared/Views/Maps/MapPicker.swift
  • MapLocationPickerSheet iOS/Shared/Views/Maps/MapPicker.swift

Interactive example

Site location
19.43260, -99.13320 Map preview needs a map provider (not connected).

States

No location yet
No location set yet. Map preview needs a map provider (not connected).

Images and documents

Local file selection with previews. Files stay in this browser tab: nothing is uploaded, persisted, or sent to a service.

ImageField

Image picker with a 140 px preview, drag and drop, paste, size/type checks, and a stored-image fallback.

iOS
  • CompanyLogoEditorView KRXCore-iOS/Source/UIUX/Views/Media/CompanyLogoEditorView.swift

Interactive example

Company logo
Example Co. stored logo

Or drag an image here, or paste one with Ctrl+V / ⌘V.

Current stored image

States

No image yet
No image selected.

Or drag an image here, or paste one with Ctrl+V / ⌘V.

Display only
Display only

Current stored image

DocumentField

Document picker that previews metadata: name, type, size, and last modified.

iOS

No iOS equivalent: iOS forms only import images (CompanyLogoEditorView) and share generated PDFs. Web-first component.

Interactive example

Signed contract

No document selected.

Accepted: .pdf, .doc, .docx, .xls, .xlsx, .csv, .txt. Up to 10 MB.

States

Required and invalid (required)

No document selected.

Accepted: .pdf, .doc, .docx, .xls, .xlsx, .csv, .txt. Up to 10 MB.

Attach the contract.

Disabled

No document selected.

Accepted: .pdf, .doc, .docx, .xls, .xlsx, .csv, .txt. Up to 10 MB.

Collections

Ordered lists of strings or related records.

StringListField

Editable list of strings with add and remove. Focus moves to the new item, or to the next one after removal.

iOS
  • Field + ForEach (General notes) iOS/Shared/Views/CorporateProfile/Form/CorporateProfileForm.swift

iOS has no list component; CorporateProfileForm renders one Field per note and an “Add note” button.

Interactive example

General notes

States

Empty

No tags yet.

RecordListField

Related records as removable chips, added through the same searchable combobox.

iOS
  • EmployeeSelector iOS/Shared/Views/HHRR/List/EmployeeSelector.swift

Interactive example

Project team
  • Ana Ejemplo EMP-0007 · Project manager
  • Carla Prueba EMP-0018 · Architect

States

Empty

No records added yet.

Display only
  • Bruno Muestra EMP-0012 · Site supervisor
  • Elena Demo EMP-0031 · Accountant

Display only

Read-only label/value pairs for detail screens. Every editable field above also supports readonly.

ValueLabel

Title above a value on the field surface, with an optional copy action.

iOS
  • ValueLabel KRXCore-iOS/Source/UIUX/Views/ValueLabel.swift
  • KeyValueView KRXCore-iOS/Source/UIUX/Views/Toggle/KeyValueView.swift
  • CopyLabelButton KRXCore-iOS/Source/UIUX/Views/Fields/CopyLabelButton.swift

Interactive example

RFC
XAXX010101000
Legal name
Example Construction Co.

States

Completion
No completion date yet