Input

Displays a form input field or a component that looks like an input field.

Source code

Click here to see the source code for this component on GitHub. Feel free to copy it and adjust it for your own use.

Installation

npx ui-thing@latest add input

Usage

Email

Label

Form

Max Length

Restrict the number of characters that can be entered into the input field.

No more than 5 characters

Pattern

Restrict the type of characters that can be entered into the input field.

You don't need to use / at the beginning and end of the pattern as the RegExp is being created internally with the new RegExp() constructor.

No spaces can be entered