Pilot
RN-universal Input pilot
Scaffoldedshadcn Input on the left (HTML input element) and the React Native Input on the right (TextInput via RN Web). Both are controlled, both honour disabled + invalid states, both emit the same DOM on the web target while the RN source file is ready to bundle for native in Phase 7.
Side-by-side: default, filled, disabled, invalid
State
shadcn (DOM input)
RN (TextInput via RN Web)
Empty
Controlled
Disabled
Invalid
Password
Numeric
Prop-name mapping
| Concern | shadcn / DOM | RN |
|---|---|---|
| Value change | onChange(e) → e.target.value | onChangeText(text) |
| Disabled | disabled | editable={!disabled} |
| Invalid | aria-invalid | invalid prop (→ accessibilityState.invalid on native) |
| Password | type="password" | secureTextEntry |
| Numeric keyboard | type="number" / inputmode | keyboardType="numeric" |
| Auto-capitalize | autocapitalize attribute | autoCapitalize prop (RN canonical names) |
| Focus | autofocus / ref.focus() | autoFocus / ref.focus() |
What this pilot proves
- RN
TextInputrenders and accepts keyboard input on the web via RN Web. - Controlled value flow works identically — RN's
onChangeTextreplacesonChange(e.target.value). - Focus ring, placeholder colour, disabled opacity, and invalid border all read from the shared token bridge (no hardcoded colours).
- Native platform prop names (
secureTextEntry,keyboardType,autoCapitalize) survive the web render via RN Web's translations.