Input
Base single-line text control: host-mediated editing, value ownership, and a live RuntimeBox.
Base Input remains draft. This page runs the actual base-input-root through Web Components, React, Vue 3 and Vue 2 on one Web host. It does not establish native-host or all-browser conformance.
The Root owns one single-line plain-text editor through its Text Control requirement. The current Web profile materializes exactly one native input[type="text"] per instance. Its renderer returns null rather than adding another editor or authored child surface. Base has no visual styling; demo layout, explanatory text and acceptance of controlled proposals belong to the application.
Value and editing ownership
Section titled “Value and editing ownership”defaultValueinitializes an uncontrolled value once. Unrelated property updates do not reset an edited value to that default.valueselects controlled ownership. Editing produces a normalized proposal; it becomes authoritative only when its owner accepts and suppliesvalueagain. The second demo Input has an owner that accepts proposals. Ownership is chosen at instance creation, not switched during its lifetime.valueChangecarries{ value, composing, data, inputType }andchangecarries{ value }. The IMEcompositionStart,compositionUpdateandcompositionEndevents carry{ value, data }; the host editing session maintains the composition candidate.
One physical target
Section titled “One physical target”disabled, readOnly, placeholder, required, name, autoComplete, minLength, maxLength, inputMode and enterKeyHint project onto that same Input.
ariaLabel, labelledBy and describedBy name and describe the textbox. Exposes include focusSelf(), blurSelf() and the value, disabled, readOnly, focused, focusVisible and composing states.
Import and boundaries
Section titled “Import and boundaries”Import the default Root, inputRoot or asInputRoot from @proto.ui/prototypes-base/input. The authored hook uses the same frozen single-line requirement.
Base does not own arbitrary type, submit/search/send commands, form submission, validation UI, selection APIs, system selection/edit-menu chrome or a second editor. Enter remains host/form-owned. inputMode and enterKeyHint are editing hints, not additional input types or commands. The visual projection has its own Shadcn Input page.
- Specification: P-BASE-INPUT
- Contract: C-TEXT-CONTROL-0001
- Implementation and tests: Base Input, input.test.ts