Live Preview with Expo
Scan the QR code with your camera. Don't have Expo yet? Enter your email or phone number and we'll send a link.
No items found.

Magic Link Login

Login

Prompts users to enter their email address to be sent a link that will sign them in to your app.

Preview this Screen

Scan with your camera to preview on your phone:

Download Expo
Screen Code

-- CODE language-jsx --
import React from 'react';
import {
 Button,
 Container,
 ScreenContainer,
 TextField,
 withTheme,
} from '@draftbit/ui';
import {
 KeyboardAvoidingView,
 StatusBar,
 StyleSheet,
 Text,
} from 'react-native';
const REPLACE_SCREEN_NAME = props => {
 const [textFieldValue, setTextFieldValue] = React.useState(undefined);
 const { theme } = props;
 React.useEffect(() => {
   StatusBar.setBarStyle('dark-content');
 }, []);
 return (
   <ScreenContainer scrollable={true} hasSafeArea={true}>
     <KeyboardAvoidingView
       style={styles.keyboardAvoidingViewZt}
       enabled={true}
       behavior=""padding""
       keyboardVerticalOffset={60}
     >
       <Container
         style={styles.containerLc}
         elevation={0}
         useThemeGutterPadding={true}
       >
         <Text
           style={StyleSheet.flatten([
             styles.textR4,
             theme.typography.headline4,
             { color: theme.colors.strong },
           ])}
         >
           What's your email?
         </Text>
         <Text
           style={StyleSheet.flatten([
             styles.textZb,
             theme.typography.body1,
             { color: theme.colors.strong },
           ])}
         >
           Enter your email address and we'll send you a magic link to sign in.
           No passwords required.
         </Text>
         <TextField
           style={styles.textFieldGG}
           type=""underline""
           label=""Enter your email...""
           keyboardType=""email-address""
           leftIconMode=""inset""
           value={textFieldValue}
           onChangeText={textFieldValue => setTextFieldValue(textFieldValue)}
         />
       </Container>
       <Container
         style={styles.containerBz}
         elevation={0}
         useThemeGutterPadding={true}
       >
         <Button style={styles.buttonTI} type=""solid"">
           Sign In
         </Button>
         <Text
           style={StyleSheet.flatten([
             styles.textNc,
             theme.typography.caption,
             { color: theme.colors.light },
           ])}
         >
           By signing in you agree to our Terms of Service, Privacy Policy and
           Cookie Policy.
         </Text>
       </Container>
     </KeyboardAvoidingView>
   </ScreenContainer>
 );
};
const styles = StyleSheet.create({
 containerLc: {
   marginTop: 32,
 },
 buttonTI: {
   width: 343,
   height: 48,
 },
 keyboardAvoidingViewZt: {
   flexGrow: 1,
   justifyContent: 'space-between',
 },
 textR4: {
   textAlign: 'center',
 },
 containerBz: {
   alignItems: 'center',
 },
 textZb: {
   marginTop: 20,
   textAlign: 'center',
 },
 textNc: {
   width: '100%',
   marginTop: 16,
   textAlign: 'center',
 },
 textFieldGG: {
   height: 82,
   marginTop: 20,
 },
});
export default withTheme(REPLACE_SCREEN_NAME);

Screen Variants:

Additional Details

Changelog

No items found.

Request access to the private beta.