Input
A text field with prefix and suffix addons and validation states.
Label and value
A label sits above, tied to the field by its id. bind:value keeps a state in step with the field.
Validation
required and type are the browser's: submit it
empty, or with an invalid email, and the browser stops it. invalid marks the field for any other error, the server's included; the message
under it is linked by aria-describedby.
Disabled and readonly
A disabled field is out of the form; a readonly one is submitted and can be selected, not changed.
Prefix and suffix
The prefix snippet sits inside the field, before the text; the suffix snippet sits after it and can hold a control. Both at once
frame a value with its units.
Examples
(empty)Submit it empty, or with a bad email.
$ USD
Try foo@blocked.dev to see the error.