Text Field

Enter text like jotting notes on your phone, offering versatility for typing and accommodating various types of information.

Text Field

A text field is a box where you can type in text, like your name or email.

Installation

In the terminal, run the following command to begin:
npx hq-kit add text-field

Suffix and Prefix

Enhance your TextField by adding a prefix or suffix. Whether it’s text or icons, it’s flexible to fit your design.

https://.com

Suffix with Button

Add a button to the suffix by simply including it in the suffix prop. While you can do the same with a prefix, it’s more common to see it as a suffix.

Pending

Activate the loading state on your TextField with the isPending prop. Adjust the loaderPosition to position the loader as desired.

Revealable

When using a text field as a password input, you may want the option to reveal the password. To enable this feature, simply add the isRevealable prop. However, ensure that the input type is explicitly set to 'password', as this is a required condition.

Controlled

Manage the TextField value through the value prop for controlled usage.

You have typed:

Validation

Validate the TextField input using the isInvalid prop.

Readonly

Set the TextField to readonly, preventing any edits.

Disabled

When the TextField is disabled, it becomes non-editable and appears inactive.