Skip to content

Input

A simple input component with support for easy labels and placeholders.

You can set the input’s type to like you would normally. Here’s a password input to show you how that’s done:

You can disable the input altogether by using the disabled prop.

Inputs have full form support. You can use the isRequired and name attributes as needed.

The first one does what it says it does, while the latter sets the name attribute so you can access the input in, for example, the FormData returned by a submission. Here’s an example showing how to set both of them:

You can pass the name of an icon using the icon prop to display it inside of the input on the left side. To show the icon on the right hand side of the input, or explicitly set the position, pass an object to the icon prop containing the name and position of the icon:

You can add a description to be shown below the input by using the description prop: