Parent PRD
#320
What to build
Build the <mnl-form-field> and <mnl-amount-input> molecule components for form composition.
mnl-form-field
- Wraps any input atom (
<mnl-input>, <mnl-select>, <mnl-toggle>) with consistent label + error layout
- Structure: label above → projected input → error message below (conditionally shown)
- Signal inputs:
label (string), error (string | null), required (boolean — shows asterisk), hint (string — subtle help text)
- When
error is set: passes error state to the projected input (via CSS class or context) and shows red error text below
- Label uses
text-xs font-medium positioned above with proper for attribute linking
mnl-amount-input
- Specialized numeric input for monetary values (matches reference image 2's Amount field)
- Structure: currency symbol prefix (
R for ZAR) + numeric input + optional currency selector
- Signal inputs:
currency (string, default 'ZAR'), placeholder, disabled
- Implements
ControlValueAccessor — value is a raw number (not formatted string)
- Focus state highlights the entire compound input with accent border (like the reference pink border)
- Formats display with thousands separators but stores raw number
Storybook: Stories under Molecules/Form Field and Molecules/Amount Input showing label/error/hint states, currency variants.
Acceptance criteria
Blocked by
User stories addressed
- User story 16: Form field wrapper
- User story 22: Amount input with currency
- User story 33: Signal input/output API
Parent PRD
#320
What to build
Build the
<mnl-form-field>and<mnl-amount-input>molecule components for form composition.mnl-form-field
<mnl-input>,<mnl-select>,<mnl-toggle>) with consistent label + error layoutlabel(string),error(string | null),required(boolean — shows asterisk),hint(string — subtle help text)erroris set: passes error state to the projected input (via CSS class or context) and shows red error text belowtext-xs font-mediumpositioned above with properforattribute linkingmnl-amount-input
Rfor ZAR) + numeric input + optional currency selectorcurrency(string, default 'ZAR'),placeholder,disabledControlValueAccessor— value is a raw number (not formatted string)Storybook: Stories under
Molecules/Form FieldandMolecules/Amount Inputshowing label/error/hint states, currency variants.Acceptance criteria
<mnl-form-field>renders label above and error below the projected inputerrorinput is non-nullrequiredis truefor/idattributes for accessibility<mnl-amount-input>shows currency prefix and accepts numeric inputControlValueAccessor(works with FormControl)Blocked by
User stories addressed