input
Reusable input component.
Usage
Components are auto-discovered. Use the component directly in any .wrn view:
<input
type="text"
name="name"
value="value"
placeholder="placeholder"
/>Legacy mount name: data-component="input".
Props and attributes
| Prop | Type | Requirement | Default |
|---|---|---|---|
type | string | Optional | "text" |
name | string | Optional | "" |
value | string | Optional | "" |
placeholder | string | Optional | "" |
class | string | Optional | "" |
Slots
This component does not declare a slot.
Events
This component does not declare a custom event.
Source contract
Installed source: components/input.wrn
// Text input. Pairs with the validation system (name maps to a field).
component Input {
props {
type = "text"
name = ""
value = ""
placeholder = ""
class = ""
}
view {
<input type="{type}" name="{name}" value="{value}" placeholder="{placeholder}" class="wire-input {class}">
}
}