SignIn Container
The main container component that wraps all sign-in related functionality. It provides a scrollable interface with keyboard handling and safe area support, serving as the foundation for building complete sign-in experiences.
Quick Start Example
import { SignIn, useAppTheme } from "@ovok/native";
import React from "react";
import { useTranslation } from "react-i18next";
import { StyleSheet } from "react-native";
// Static styles outside component
const styles = StyleSheet.create({
container: {
flex: 1,
},
});
const LoginScreen = () => {
const { t } = useTranslation();
const theme = useAppTheme();
return (
<SignIn
style={[
styles.container,
{
backgroundColor: theme.colors.background,
},
]}
contentContainerStyle={{
padding: theme.spacing(3),
gap: theme.spacing(4),
}}
>
<SignIn.Header>
<SignIn.Header.Title>{t("auth.signIn.title")}</SignIn.Header.Title>
<SignIn.Header.Description>
{t("auth.signIn.description")}
</SignIn.Header.Description>
</SignIn.Header>
<SignIn.EmailForm
loginType="Patient"
tenantCode="your-tenant-code"
onSuccess={(response) => {
// Handle successful authentication
}}
onError={(error) => {
// Handle authentication error
}}
>
<SignIn.EmailForm.Inputs />
<SignIn.EmailForm.SigninButton />
</SignIn.EmailForm>
</SignIn>
);
};
export default LoginScreen;
Props
This component extends KeyboardAwareScrollView which inherits all ScrollView props and adds keyboard-aware functionality.
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
children | ReactNode | ✓ | - | SignIn child components |
style | ViewStyle | - | undefined | Container style overrides |
contentContainerStyle | ViewStyle | - | undefined | Content container style overrides |
...scrollViewProps | ScrollViewProps | - | - | All ScrollView props are supported |
For complete API reference, see the KeyboardAwareScrollView Props documentation.
Child Components
- SignIn.Header - Header section with title and description
- SignIn.Form - Email/password form components and authentication logic
- SignIn.SocialLogins - Social authentication options (Google, Apple)
Related Components
- SignIn.Header - Header section with title and description
- SignIn.Form - Email/password form components and authentication logic
- SignIn.SocialLogins - Social authentication options (Google, Apple)