Skip to main content

Pin Field

Pin Field is a text input that displays a short code in separate cells, such as a verification or booking code.

Import

import { PinField } from '@vortexlabs/vortex-native';
import type { PinFieldProps } from '@vortexlabs/vortex-native';

Other links

PinField.Root

PinField.Root props
PropTypeDefaultAttributes
children
React.ReactNode
No default value
size
Responsive<"sm" | "md" | "lg">
md
variant
"outline" | "fill"
outline
disabled
boolean
false
error
boolean
false
gap
Responsive<number>
2
style
StyleProp<ViewStyle>
No default value
attributes
Omit<ViewProps, "children" | "style">
No default value

PinField.Label

PinField.Label props
PropTypeDefaultAttributes
children
React.ReactNode
No default value

PinField.Input

PinField.Input props
PropTypeDefaultAttributes
name
string
No default value
length
number
4
pattern
"numeric" | "alphabetic" | "alphanumeric"
numeric
value
string
No default value
defaultValue
string
""
onChange
(args: PinFieldChangeArgs) => void
No default value
onComplete
(args: PinFieldChangeArgs) => void
No default value
onFocus
(event: FocusEvent) => void
No default value
onBlur
(event: FocusEvent) => void
No default value
ref
React.Ref<TextInputInstance>
No default value
style
StyleProp<ViewStyle>
No default value
attributes
Omit<NonNullable<TextFieldInputProps["attributes"]>, "maxLength" | "selection" | "secureTextEntry" | "multiline">
No default value

PinField.HelperText

PinField.HelperText props
PropTypeDefaultAttributes
children
React.ReactNode
No default value

PinField.ErrorMessage

PinField.ErrorMessage props
PropTypeDefaultAttributes
children
React.ReactNode
No default value