Input

An Input component allows users to enter text data. Built on top of heroui-native Input.

Demo

Demo Coming Soon

Input examples will be available soon.

Usage

import { NInput } from '@nayan-ui/react';
import { useState } from 'react';
const Input = () => {
const [email, setEmail] = useState('niranjan.devasani@gmail.com');
return (
<NInput id="email" type="email" label="Email" placeholder="Enter email" className="mb-3" value={email} onChange={e => setEmail(e.target.value)} />
);
};
export default Input;

Attributes

NameTypeDefaultDetails
labelstringOptionalLabel for the input field.
descriptionstringOptionalDescription text below the input.
errorMessagestringOptionalError message to display.
multilinebooleanfalseWhether to render as a multiline textarea.
isDisabledbooleanfalseWhether the input is disabled.
isRequiredbooleanfalseWhether the input is required.
isInvalidbooleanfalseWhether the input is in an invalid state.
valuestringOptionalControlled input value.
onChange(value: string) => voidOptionalCallback when input value changes.
classNamestring' 'You can customise input by passing tailwind classes.
containerClassNamestring' 'You can customise container by passing tailwind classes.
labelClassNamestring' 'You can customise label by passing tailwind classes.
descriptionClassNamestring' 'You can customise description by passing tailwind classes.
errorClassNamestring' 'You can customise error by passing tailwind classes.