stofli-ui
Version:
Biblioteca moderna de componentes UI para React con Tailwind CSS y Framer Motion
53 lines (50 loc) • 1.6 kB
TypeScript
import React from 'react';
interface NumberInputProps {
value?: number;
defaultValue?: number;
min?: number;
max?: number;
step?: number;
disabled?: boolean;
readonly?: boolean;
label?: string;
placeholder?: string;
error?: string;
size?: "sm" | "md" | "lg";
variant?: "default" | "primary" | "secondary" | "success" | "warning" | "danger";
radius?: "none" | "sm" | "md" | "full";
fullWidth?: boolean;
className?: string;
inputClassName?: string;
labelClassName?: string;
errorClassName?: string;
controlsClassName?: string;
controlButtonClassName?: string;
inputContainerClassName?: string;
controlsLayout?: "default" | "compact" | "split";
controlsPosition?: "right" | "both";
showControls?: boolean;
iconSet?: "chevron" | "plusminus";
required?: boolean;
name?: string;
id?: string;
animationStyle?: "slide" | "pulse" | "scale" | "bounce";
format?: "default" | "percentage" | "currency" | "signed";
formatOptions?: {
symbol?: string;
position?: "prefix" | "suffix";
};
onChange?: (value: number) => void;
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
"aria-label"?: string;
"aria-describedby"?: string;
description?: string;
errorId?: string;
descriptionId?: string;
hideLabel?: boolean;
autoComplete?: string;
}
declare const NumberInput: React.FC<NumberInputProps>;
export { NumberInput as default };
export type { NumberInputProps };