Skip to main content

SocialLoginButton

OAuth/social login buttons with customizable styling.

Basic Usage​

import { SocialLoginButton } from '@multinaire/expo-ui';

<SocialLoginButton
title="Continue with Google"
icon="Google"
onPress={() => signInWithGoogle()}
/>

Props​

PropTypeDefaultDescription
titlestring—Button label text
iconIconName—Icon name displayed inside the button
iconTypeIconType—Iconsax icon style variant
iconColorColorKeys—Icon color key from the active theme palette
titleColorstring—Custom foreground color for the title text (accepts any CSS/RN color string)
backgroundColorstring—Custom background color (accepts any CSS/RN color string)
flexnumber—Flex grow value
widthDimensionValue—Fixed width of the button
heightDimensionValuetheme mediumFixed height of the button. Defaults to the theme's medium height
marginSpacingProps—Outer margin
isLoadingbooleanfalseShow a loading animation and disable the button
testIDstringtitleTest identifier for UI automation. Defaults to the title value
onPress() => void—Press handler. When omitted the button renders in a disabled (dimmed) state

Examples​

Google Sign-In​

<SocialLoginButton
title="Continue with Google"
icon="Google"
backgroundColor="#ffffff"
titleColor="#000000"
onPress={() => signInWithGoogle()}
/>

Apple Sign-In​

<SocialLoginButton
title="Continue with Apple"
icon="Apple"
backgroundColor="#000000"
titleColor="#ffffff"
onPress={() => signInWithApple()}
/>

Facebook Sign-In​

<SocialLoginButton
title="Continue with Facebook"
icon="Facebook"
backgroundColor="#1877F2"
titleColor="#ffffff"
onPress={() => signInWithFacebook()}
/>

Full Width Login Options​

<Container gap={12}>
<SocialLoginButton
width="100%"
title="Continue with Google"
icon="Google"
onPress={() => signInWithGoogle()}
/>
<SocialLoginButton
width="100%"
title="Continue with Apple"
icon="Apple"
backgroundColor="#000000"
titleColor="#ffffff"
onPress={() => signInWithApple()}
/>
</Container>