@papernote/ui
Version:
A modern React component library with a paper notebook aesthetic - minimal, professional, and expressive
35 lines • 1.49 kB
TypeScript
export type ValidationState = 'error' | 'success' | 'warning' | null;
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
label?: string;
helperText?: string;
validationState?: ValidationState;
validationMessage?: string;
maxLength?: number;
showCharCount?: boolean;
/** Auto-expand textarea height based on content */
autoExpand?: boolean;
/** Minimum rows when auto-expanding (default: 2) */
minRows?: number;
/** Maximum rows when auto-expanding (default: 10) */
maxRows?: number;
/** Resize behavior (default: 'vertical') - overridden to 'none' when autoExpand is true */
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
/** Show loading spinner (for async operations like auto-save) */
loading?: boolean;
/**
* Size variant - 'md' is default, 'lg' provides larger touch-friendly text and padding.
* On mobile, 'md' is automatically upgraded to 'lg' for better touch targets.
*/
size?: 'sm' | 'md' | 'lg';
/**
* Enter key hint for mobile keyboards.
* 'enter' - Standard enter key (newline)
* 'done' - Done action
* 'go' - Go/navigate action
* 'send' - Send action
*/
enterKeyHint?: 'enter' | 'done' | 'go' | 'send';
}
declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
export default Textarea;
//# sourceMappingURL=Textarea.d.ts.map