Skip to main content
Version: 1.0.3

Input

The AnimatedInput component provides a rich collection of animated input fields with various effects and styles. Each variant offers unique animations for both the input field and its label, creating engaging user interactions.

Installation

ignix add component input

Usage

Import the component:

import AnimatedInput from '@ignix-ui/input';

Basic Usage

function BasicInput() {
const [value, setValue] = useState('');

return (
<AnimatedInput
placeholder="Enter your name"
variant="clean"
value={value}
onChange={(newValue) => setValue(newValue)}
/>
);
}

Props

PropTypeDefaultDescription
placeholderstring-The placeholder text for the input and label
variantstring-The animation variant to use (e.g., clean, shimmer, neon, glassmorphism, etc.)
valuestring-The current value of the input
onChange(value: string) => void-Callback function triggered when the input value changes
typestring"text"The HTML input type (e.g., "text", "password", "email")
size"sm" | "md" | "lg""md"The size of the input field
disabledbooleanfalseWhether the input is disabled
errorstring-Error message to display below the input
successboolean-Whether to show a success state
iconReact.ElementType-Optional leading icon to display
showPasswordTogglebooleanfalseWhether to show a toggle button for password visibility (if type is "password")
inputClassNamestring""Additional CSS classes for the input element
labelClassNamestring""Additional CSS classes for the label element
onFocus() => void-Callback triggered on focus
onBlur() => void-Callback triggered on blur