UNPKG

@buun_group/brutalist-ui

Version:
55 lines (54 loc) 1.57 kB
/** * @module Input * @description A flexible input component with support for different types, sizes, and validation states. Follows accessibility best practices with full keyboard support and ARIA compliance. */ import React, { InputHTMLAttributes } from 'react'; /** * Props for the Input component */ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> { /** * The validation state variant of the input * @default 'default' */ variant?: 'default' | 'error' | 'success'; /** * The size of the input field * @default 'md' */ size?: 'sm' | 'md' | 'lg'; /** * Icon to display on the left side of the input */ leftIcon?: React.ReactNode; /** * Icon to display on the right side of the input */ rightIcon?: React.ReactNode; /** * Whether the input should take full width of its container * @default false */ fullWidth?: boolean; /** * Whether to apply the brutalist shadow effect * @default true */ brutalistShadow?: boolean; } /** * A flexible input component that supports various input types, validation states, and icons. * Provides a consistent brutalist design with customizable sizing and styling options. * * @example * ```tsx * <Input * type="email" * placeholder="Enter your email" * variant="default" * size="md" * leftIcon={<MailIcon />} * /> * ``` */ export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;