All input types, validation states, icon slots, clear button, numeric stepping with arrow-key support, native color picking, and DevEUI/credit-card formatting.
size uses the shared control heights (32 / 40 / 48px), so inputs line up with buttons,
dropdowns and other controls of the same size.
Hint, required & read-only
hint and error share the slot under the field and are linked with aria-describedby. required adds a visual marker and aria-required.
Shown on the dashboard and in alerts.
Assigned automatically.
Button labels are overridable for localisation.
Credit Card Types
Max Length & Clear Button
The clear button appears when clearable is set and the input has a value.
Validation States
Validation icons auto-render on the right side.
This field is required
With Icon Slots
Invalid entry
API
Usage and API reference
CwInput is a single component that covers standard text fields plus CropWatch-specific formatting helpers like DevEUI, credit card, and expiry input. The parent still owns the value through normal binding.
How to think about it
Choose the input type deliberatelyUse the specialized types only when you want the built-in formatting behavior. Otherwise stay with plain `text`, `email`, or `password`.
Tune numeric stepping when precision matters`numeric` fields render inline up/down controls, respond to `ArrowUp` and `ArrowDown` while focused, and optionally respect `step`, `min`, and `max`.
Use validation props for field-level feedback`error` and `valid` control the right-side validation icon and the helper message under the field.
Reach for slots before custom wrappers`leftSlot` and `rightSlot` are the intended extension points for icons and inline actions.
Props and callbacks
Standard input attributes such as `name`, `required`, `autocomplete`, `aria-*`, and `class` pass through to the real `<input>`.