@brainsbeards/react-native-animated-code-input
Version:
Animated code input component for React Native, with support for iOS, Android, and React Native Web. It works with one-time code autofill on iOS and Android.
40 lines (39 loc) • 1.32 kB
TypeScript
import React from "react";
import { ViewStyle, StyleProp, TextProps } from "react-native";
export interface ICodeInputProps {
cursorAnimationDuration?: number;
codeAnimationDuration?: number;
value: string;
index?: number;
textColor?: string;
codeContainerStyle?: {
backgroundColor?: string;
borderWidth?: number;
codeWidth?: number;
codeHeight?: number;
inputFontSize?: number;
borderRadius?: number;
fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
customStyle?: StyleProp<ViewStyle>;
};
activeCodeContainerStyle?: {
backgroundColor?: string;
borderWidth?: number;
codeWidth?: number;
codeHeight?: number;
inputFontSize?: number;
borderRadius?: number;
fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
customStyle?: StyleProp<ViewStyle>;
};
cursorStyle?: {
color?: string;
fontSize?: number;
marginLeft?: number;
marginTop?: number;
customStyle?: StyleProp<TextProps>;
};
afterInputDelay?: number;
}
export declare const InputSingleItem: React.FC<ICodeInputProps>;
export default InputSingleItem;