← Back to Index

Form Field Figma: Master Form Field primitive tier

Updated: 2026-06-26

Audited: 2026-06-26

Multi-variant input row — search input, autocomplete results, navigation list rows, and labeled Flight Finder fields
Figma component: Master Form Field (node 229:152 "input_with_icons") · Screens: Search 4951:11891, Airline Policies 4713:25321, Flight Finder 4713:25117 · file key: psH738AqHDxuMyFm897f9r
Primitive tier — one Figma shell, four usage variants. The Figma Master Form Field component (node 229:152) is reused across every data-input and list-row context in the app. Variant is determined by which slots are populated and which background/border tokens are applied — not by separate Figma components. The four variants are: search (white bg, leading icon + trailing clear), result-row (border-bottom only, text only — autocomplete suggestions), nav-row (border-bottom + trailing chevron — Airline Policies list), and labeled (label above + white box — Flight Finder inputs on blue bg).
Design tokens sourced from Figma file key psH738AqHDxuMyFm897f9r · Search screen (4951:11891) · Airline Policies (4713:25321) · Flight Finder (4713:25117) · captured 2026-06-26

Live CSS Preview

Search input (white bg, floating — Search screen top)
Result rows (autocomplete — border-bottom only)
DART
daub
dolor
Nav rows (Airline Policies — border-bottom + chevron)
21 Air
Air Canada
Air Transport International
Labeled field (Flight Finder — label + white box on blue bg)
Departure Airport

Design Tokens

Dimensions

Horizontal padding
16 px (--buttons-and-form-fields/horizontal-padding)
Vertical padding
16 px (--buttons-and-form-fields/vertical-padding)
Icon gap
12 px (--buttons-and-form-fields/icon-text-gap)
Leading/trailing icon size
18×18 px
Chevron (nav-row) size
18×18 px slot · 10×8.67 px chevron glyph
Label → field gap
4 px (labeled variant)

Colors

Search / labeled bg
interactive/fields white (border also white)
Result-row / nav-row border
border/default #d2d4d6
Input text
text/primary #05273e
Label text (labeled variant)
Afacad SemiBold 16px navy (or white on blue bg)

Typography — Input text

Font family
Afacad SemiBold
Font weight
600
Font size
18 px (UI/forms/input text)
Line height
100% (1)
Color
text/primary #05273e

Typography — Label (labeled variant)

Font family
Afacad SemiBold
Font weight
600
Font size
16 px (Body/XS)
Color
white on blue container bg

Variants

VariantCSS modifierBackgroundBorderIconsUsed in
Search input--searchwhite (interactive/fields)1px solid white (invisible)Leading: search mag, Trailing: × clearSearch screen top bar
Result row--result-rownone (inherits page)border-bottom 1px #d2d4d6NoneSearch autocomplete list
Nav row--nav-rownone (inherits page)border-bottom 1px #d2d4d6Trailing: chevron-rightAirline Policies list
Labeled--labeledwhite (interactive/fields)1px solid white (invisible)Optional leading/trailingFlight Finder date/airport inputs

Layer Tree

└── .alpa-form-field · FRAME · flex-col · gap-4px (optional label above)
    ├── .alpa-form-field__label · TEXT · Afacad SemiBold 16px · (labeled variant only)
    └── .alpa-form-field__input-row · FRAME · flex-row · gap-12px · px-16px py-16px
        ├── .alpa-form-field__icon [start] · 18×18px · (search variant only — mag icon)
        ├── .alpa-form-field__text · flex:1 · Afacad SemiBold 18px · input or span
        ├── .alpa-form-field__icon [end] · 18×18px · (search: × clear; nav-row: chevron)

ViewModel

New ViewModel needed — not yet in ComponentViewModels.cs. Add FormFieldViewModel and FormFieldVariant enum alongside existing types.

public enum FormFieldVariant { Search, ResultRow, NavRow, Labeled }

└── FormFieldViewModel : ComponentViewModel
    ├── Label : string? — above-field label (Labeled variant); null collapses row
    ├── Placeholder : string? — dimmed hint text
    ├── Value : string? — current input value
    ├── Variant : FormFieldVariant — discriminates layout and border/bg rules
    ├── HasLeadingIcon : bool — show leading icon slot (search mag)
    ├── HasClearButton : bool — show trailing × clear button (Search variant)
    ├── HasChevron : bool — show trailing chevron (NavRow variant); derived from Variant
    └── Link : string? — navigation target (NavRow variant — wires to nav service)

Usage Context

ScreenNodeVariantNotes
Search4951:11895SearchTop bar; mag leading + × trailing; white floating on #f5f7fa page bg
Search — autocomplete4951:11899–11908ResultRowThin gray bottom border; text only; Afacad SemiBold 18px
Airline Policies4713:25324–25333NavRowAirline name left + chevron right; each row navigates to that airline's policy doc
Flight Finder4713:25117LabeledLabel above (white text on blue container bg) + white input box; used for date, departure/arrival airport fields

Developer Notes

Blazor Component API

Target home: ALPAMobile.HybridUi. Component file: FormField.razor. New ViewModel required: FormFieldViewModel.

ParameterTypeRequiredDescription
VmFormFieldViewModelYesAll field data including variant, value, placeholder, icons.
OnValueChangedEventCallback<string>NoFires on every keystroke (Search variant — drives autocomplete).
OnClearEventCallbackNoFires when × button tapped (Search variant).
OnResultSelectedEventCallback<FormFieldViewModel>NoFires when result-row row is tapped.
OnNavTapEventCallback<FormFieldViewModel>NoFires when nav-row is tapped; consumer calls nav service with Vm.Link.

Razor Usage (target)

@* Search input bar *@
<AlpaFormField Vm="@searchField"
               OnValueChanged="@HandleSearchInput"
               OnClear="@ClearSearch" />

@* Autocomplete result rows *@
@foreach (var result in SearchResults)
{
    <AlpaFormField Vm="@result"
                   OnResultSelected="@SelectResult" />
}

@* Airline Policies nav list *@
@foreach (var airline in Airlines)
{
    <AlpaFormField Vm="@airline"
                   OnNavTap="@NavigateToPolicy" />
}

CSS Class Reference (target)

Classes will live in ALPAMobile.HybridUi/wwwroot/css/alpa-components.css under the alpa-form-field BEM block.

ClassScopeKey rules
.alpa-form-fieldRoot wrapperdisplay:flex; flex-direction:column; gap:4px; width:100%
.alpa-form-field__labelAbove-field labelfont-family:var(--font-family/alt); font-weight:600; font-size:16px; line-height:1.3 · color inherits from container context
.alpa-form-field__input-rowIcon + text rowdisplay:flex; align-items:center; gap:12px; padding:16px
.alpa-form-field__iconLeading or trailing icon slotwidth:18px; height:18px; display:flex; align-items:center; justify-content:center; flex-shrink:0
.alpa-form-field__textInput or read-only textflex:1; font-family:var(--font-family/alt); font-weight:600; font-size:18px; color:var(--text-primary); border:none; background:transparent; outline:none
.alpa-form-field--searchSearch variant modifier.alpa-form-field__input-row { background:white; border:1px solid white }
.alpa-form-field--result-rowAutocomplete row modifier.alpa-form-field__input-row { border-bottom:1px solid var(--border-default, #d2d4d6) }
.alpa-form-field--nav-rowNavigation list row modifiercursor:pointer · .alpa-form-field__input-row { border-bottom:1px solid var(--border-default, #d2d4d6) }
.alpa-form-field--labeledLabeled Flight Finder modifier.alpa-form-field__input-row { background:white; border:1px solid white }