React Native MantineInputs

PasswordInput

Secure password input with visibility toggle

Import: import { PasswordInput } from 'react-native-mantine';

Usage

import { PasswordInput } from 'react-native-mantine';

<PasswordInput
  label="Password"
  placeholder="Enter password"
  required
  onChangeText={setPassword}
/>

Props

PropTypeDefaultDescription
visiblebooleanControlled visibility state. When true, password text is visible; when false, text is obscured
onVisibilityChange(visible: boolean) => voidCallback fired when the visibility toggle button is pressed, receives the new visibility state
visibilityToggleLabelstring"Toggle password visibility"Accessibility label for the visibility toggle button
visibilityToggleIcon(visible: boolean) => React.ReactNodeCustom icon component for the visibility toggle. Receives current visibility state as parameter
labelReact.ReactNodeInput label displayed above the password field
descriptionReact.ReactNodeDescription text displayed below the label and above the input
errorReact.ReactNodeError message displayed below the input. When set, input border becomes red
size'xs' | 'sm' | 'md' | 'lg' | 'xl''sm'Input size that controls height, font size, and padding
radiusnumber | "xs" | "sm" | "md" | "lg" | "xl"'sm'Key of theme.radius or any valid number to set border-radius
iconReact.ReactNodeIcon displayed on the left side of the input field
requiredbooleanfalseDisplays a red asterisk (*) after the label to indicate field is required
variant'default' | 'filled' | 'unstyled''default'Controls input appearance: default (outlined), filled (background), or unstyled (no borders)
placeholderstringPlaceholder text displayed when input is empty
valuestringInput value for controlled component
onChangeText(text: string) => voidCallback fired when input value changes
onBlur() => voidCallback fired when input loses focus
editablebooleantrueIf false, input is read-only and cannot be edited
autoCapitalize'none' | 'sentences' | 'words' | 'characters''none'Controls automatic capitalization behavior
styleViewStyleAdditional styles applied to the input element itself
wrapperStyleViewStyleAdditional styles applied to the wrapper container

Source on GitHub · npm