Native only
Face ID
Face ID gate, or the hook for a single action · real only in a dev build
function BiometricGateDemo() { const [round, setRound] = React.useState(0); return ( <View className="w-full gap-3"> <Card className="w-full px-4 py-4"> <BiometricGate key={round} title="Account details" subtitle="Unlock to see the balance and card number." className="py-6"> <View className="items-center gap-2 py-6"> <Text variant="h4">$4,182.00</Text> <Text className="text-muted-foreground text-sm">•••• •••• •••• 4429</Text> </View> </BiometricGate> </Card> <Button size="sm" variant="outline" onPress={() => setRound((r) => r + 1)}> <Text>Lock again</Text> </Button> </View> );}Usage
Hides its children until Face ID succeeds. Use the hook instead when you are confirming a single action. Real only in a dev build — Expo Go and the web simulate it.
API
<BiometricGate title? subtitle? prompt? locked? onUnlock? simulate?>…</BiometricGate> · useBiometricAuth()Get it
Already in every copy of the native kit:
import { BiometricGate, useBiometricAuth } from '@/components/kit/biometric-gate';Details
- Exports
BiometricGate,useBiometricAuth- Packages
- expo-local-authentication@~57.0.3, lucide-react-native@^1.21.0
- Installs with
- @halftone-native/button, @halftone-native/lib-haptics, @halftone-native/lib-native-context, @halftone-native/lib-utils, @halftone-native/spinner, @halftone-native/spot, @halftone-native/text
- Also searched as
- face id, touch id, fingerprint, lock, unlock, biometrics
- Registry JSON
- /r/native/biometric-gate.json
Agents: the whole registry is at /llms.txt.