Skip to main content

SocialLoginButton

OAuth/social login buttons with customizable styling.

Basic Usage

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

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

Props

PropTypeDefaultDescription
titlestringButton label text
iconIconNameIcon name displayed inside the button
iconTypeIconTypeIconsax icon style variant
iconColorColorKeysIcon color key from the active theme palette
titleColorstringCustom foreground color for the title text (accepts any CSS/RN color string)
backgroundColorstringCustom background color (accepts any CSS/RN color string)
flexnumberFlex grow value
widthDimensionValueFixed width of the button
heightDimensionValuetheme mediumFixed height of the button. Defaults to the theme's medium height
marginSpacingPropsOuter margin
isLoadingbooleanfalseShow a loading animation and disable the button
testIDstringtitleTest identifier for UI automation. Defaults to the title value
onPress() => voidPress 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>