Input

A component for collecting data input.

Enter your full name

Usage

import { Input, InputWrapper } from "#/ui/components/Input"
<InputWrapper label="Name">
  <Input placeholder="Dan Spratling" />
</InputWrapper>

How it works

The Input component provides some base styling to the regular input element, but you can pass any other props to it that you would normally pass to an input element too.

The InputWrapper goes around your Input to provide additional associated elements easily like labels & hints, but it’s totally optional if you want to use an Input separate from your labels and roll-your-own.

Hint

You can pass a hint to the InputWrapper to provide additional context to the user.

What do you call yourself?

Error

Passing an error to the InputWrapper and Input will display error styles. If a hint exists, it will be replaced with the error.

Your name is required

Leading Elements

You can pass a InputLeading element to the InputWrapper to provide additional context to the user. This can accept any element as a child, which you can style yourself, but there are a few presets to help you get started.

Icon

Text

https://

Trailing Elements

Similar to the leading elements, this can accept children but has a few presets ready to go.

Icon

Text

/blog

Custom

You can customise the input however you’d like by passing predefined or custom leading/trailing components within the slots. You can also style these components to match the input if necessary.

https://

required