Input

An Input component is a user interface element that allows users to enter data, such as text, numbers, or selections. It typically includes various types, such as text fields, checkboxes, radio buttons, and dropdowns, providing flexibility for different data types. Input components are essential for forms and interactive applications, enabling users to submit information effectively and efficiently.
# Demo

Basic Inputs

Simple input fields with labels and placeholders.

Input Types

Different input types for various data formats.

Inputs with Icons

Enhanced inputs with icon elements for better UX.

Input States

Different states and validation examples.

Email format is correct
Username should be at least 6 characters
Validating input...

Input Sizes

Different input sizes for various use cases.

Custom Styled Inputs

Inputs with custom styling and themes.

Form Integration

Inputs integrated within a complete form.

Contact Information

Optional: Provide additional details

Helper Text and Validation

Inputs with helpful guidance and validation messages.

Username must be 3-20 characters long and contain only letters, numbers, and underscores
0/150 characters
This field cannot be left empty
Format: ABC-123 (3 letters, dash, 3 numbers)

Real-time Validation

Inputs with live validation feedback.

Current Values:

Email: Not entered

Password: Not entered

Search: Not entered

# Usage
# Attributes
NameTypeDefaultDetails
idstringOptionalYou can pass id to create unique identifier.
labelReact.ReactNodeOptionalLabel for the input field.
labelClassNamestring' 'You can customise by passing tailwind classes.
inputClassNamestring' 'You can customise by passing tailwind classes.
wrapperClassNamestring' 'You can customise wrapper by passing tailwind classes.
errorReact.ReactNodeOptionalError message to display.
helperTextReact.ReactNodeOptionalHelper text to display.
onChange(e: React.ChangeEvent<HTMLInputElement>) => voidOptionalChange event handler.