Use this file to discover all available pages before exploring further.
AMS organises its interface into a set of focused, single-responsibility components that live in src/components/. Each component consumes design tokens from src/constants/ — colors, Fonts, and spacing — so visual changes propagate automatically across every screen. Components are grouped below by their role in the UI: Buttons, Inputs, Headers, Cards & Lists, Profile, and Notifications.
PrimaryButton is the main call-to-action button used on auth and booking screens. It supports two visual variants — primary (solid colors.primary background with white text) and secondary (soft colors.secondary background with colors.primary text) — controlled by the type prop.Props
ButtonComp is a generic solid button wrapper built on TouchableOpacity. Unlike PrimaryButton, it does not have a secondary variant — it always renders with a colors.primary background. An optional width prop lets you constrain its size; without it the button stretches to full width.Props
SocialButton renders a square icon button used for third-party authentication (Google, Facebook, Apple). It displays a provider logo image inside a colors.secondary pill with a subtle shadow. Pass a local require(...) or remote URI as image.Props
Prop
Type
Default
Description
image
ImageSourcePropType
—
Provider logo (local require or URI object)
onPress
() => void
—
Press handler
import SocialButton from '../components/SocialButton';<SocialButton image={require('../assets/icons/google.png')} onPress={handleGoogleLogin}/><SocialButton image={require('../assets/icons/apple.png')} onPress={handleAppleLogin}/>
TabButtons
TabButtons is a single pill-shaped tab selector used on appointment list screens to switch between status categories. An active state changes the background to solid #2F5CF5 with white text; the inactive state uses #DCE5FF with #2F5CF5 text.Props
CustomInput is the standard labelled text field used throughout forms in AMS. It wraps React Native’s TextInput inside a colors.secondary rounded container. Optional leftIcon and rightIcon slots accept any renderable node (SVG, Ionicons, etc.). Outer, container, and inner input styles are all individually overridable via the style, inputContainerStyle, and inputStyle props.Props
Prop
Type
Default
Description
label
string
—
Optional label rendered above the input
placeholder
string
—
Input placeholder text
value
string
—
Controlled value
onChangeText
(text: string) => void
—
Change handler
secureTextEntry
boolean
false
Masks input (use PasswordInput for a toggle)
keyboardType
KeyboardTypeOptions
'default'
Numeric, email, phone, etc.
leftIcon
ReactNode
—
Icon rendered on the left side
rightIcon
ReactNode
—
Icon rendered on the right side
editable
boolean
true
Whether the field is editable
placeholderTextColor
string
—
Placeholder text color override
multiline
boolean
false
Enables multiline mode
numberOfLines
number
1
Number of lines when multiline is true
textAlignVertical
string
'center'
Vertical text alignment inside the field
style
StyleProp<ViewStyle>
—
Overrides the outermost wrapper style
inputContainerStyle
StyleProp<ViewStyle>
—
Overrides the inner container row style
inputStyle
StyleProp<TextStyle>
—
Overrides the TextInput style
import CustomInput from '../components/CustomInput';import Ionicons from 'react-native-vector-icons/Ionicons';<CustomInput label="Email Address" placeholder="you@example.com" value={email} onChangeText={setEmail} keyboardType="email-address" leftIcon={<Ionicons name="mail-outline" size={18} color={colors.primary} />}/>// Multiline notes field<CustomInput label="Reason for visit" placeholder="Describe your symptoms..." value={notes} onChangeText={setNotes} multiline numberOfLines={4} textAlignVertical="top"/>
PasswordInput
PasswordInput is a specialised password field that manages its own show/hide toggle state. Pressing the eye icon switches the secureTextEntry value between true and false, showing eye-off-outline or eye-outline from Ionicons accordingly. It uses colors.secondary as its background, colors.input (#60A5FA) for typed text and placeholder text, and colors.grey for the toggle icon.Props
Prop
Type
Default
Description
value
string
—
Controlled value
onChangeText
(text: string) => void
—
Change handler
placeholder
string
—
Placeholder text
import PasswordInput from '../components/PasswordManager/PasswordInput';<PasswordInput placeholder="Enter your password" value={password} onChangeText={setPassword}/>
PaymentInput
PaymentInput is a selectable payment method row used on the payment screen. Each row shows a provider icon on the left and a radio-button indicator on the right (composed of OuterCircle and InnerCircle SVGs). When the selected value matches the row’s text, InnerCircle fills with colors.primary. A 500 ms setTimeout delay fires the onPress callback after the selection animation settles.Props
Prop
Type
Default
Description
text
string
—
Payment method name (also used as the selection key)
Headers (exported as Header) is the general-purpose screen header. It renders a centred title with an optional back button on the left and a configurable right slot. The back button calls navigation.goBack() by default, but this can be overridden with onBackPress. The right slot accepts either a built-in settings icon or a fully custom rightComponent.Props
Prop
Type
Default
Description
title
string
—
Screen title (centred, truncated to 1 line)
showBackButton
boolean
true
Shows the chevron-back Ionicon on the left
showRightIcon
boolean
false
Shows a settings icon on the right when no rightComponent is provided
onBackPress
() => void
—
Custom back handler; falls back to navigation.goBack()
onRightPress
() => void
—
Callback for the built-in right settings icon
rightComponent
ReactNode
—
Fully replaces the right slot with any component
import Header from '../components/Headers';// Standard back-button header<Header title="Appointment Details" />// Header with custom right action<Header title="My Profile" showRightIcon onRightPress={() => navigation.navigate('Settings')}/>// Header with custom right component<Header title="Doctors" rightComponent={ <TouchableOpacity onPress={openFilter}> <FilterIcon /> </TouchableOpacity> }/>
DoctorsHeader
DoctorsHeader is the specialised header shown on the doctor listing screen. It combines a back button, a title, search and filter icon buttons (top row), and a sort bar with five sort modes (bottom row). The sort bar uses a controlled selectedTab index: 0 = A→Z alphabetical, 1 = top-rated (Star), 2 = favourited (Heart), 3 = female doctors (Venus), 4 = male doctors (Mars). The active sort chip renders with a colors.primary background.Props
HomeHeaders is the app’s home screen header. It loads the logged-in user’s fullName from getLoggedInUser() (async, stored locally) and displays a welcome greeting alongside a profile avatar image. The right side provides two icon buttons: one navigating to NotificationScreen and one for settings.PropsHomeHeaders accepts no external props — user data and navigation are resolved internally.
import HomeHeaders from '../components/HomeHeaders';// Drop in at the top of the Home screen<HomeHeaders />
User name is fetched asynchronously on mount. The component shows an empty string until the storage call resolves, then switches to 'Guest' if no fullName is found.
ScheduleHeader
ScheduleHeader is the header for the doctor info / appointment scheduling screen. It can render in two modes controlled by showSchedule:
Doctor mode (showSchedule={false}, default): shows the doctor’s name and qualification inside a colors.primary pill.
Schedule mode (showSchedule={true}): shows a “Schedule” badge with a calendar icon.
Both modes display Phone, Video, and Chat icon action buttons in the centre row, and a question mark and filled heart icon on the far right.Props
Prop
Type
Default
Description
title
string
—
Doctor’s name
qualification
string
—
Doctor’s qualification (appended after title)
onBack
() => void
—
Back button press handler
showSchedule
boolean
false
Switches between doctor-name and schedule-badge modes
import ScheduleHeader from '../components/ScheduleHeader';// Doctor info mode<ScheduleHeader title="Dr. Sarah Jones" qualification=", MD" onBack={() => navigation.goBack()}/>// Scheduling mode<ScheduleHeader title="Dr. Sarah Jones" qualification=", MD" onBack={() => navigation.goBack()} showSchedule/>
DoctorCard renders a vertically scrollable FlatList of doctor summary cards. Each card shows the doctor’s avatar image, name, qualification, department, an “Info” button that navigates to the Info screen, and four action icon buttons (Calendar, Direct, QuestionMark, Heart). The component is self-contained — it owns the FlatList and scroll behaviour.Props
Prop
Type
Default
Description
doctors
Doctor[]
—
Array of doctor objects; each must have id, avatar, name, qualification, and department
navigation
NavigationProp
—
React Navigation prop used to navigate to 'Info'
import DoctorCard from '../components/DoctorCard';<DoctorCard doctors={doctorsList} navigation={navigation}/>
DoctorCard renders its own FlatList. Do not nest it inside another FlatList or ScrollView to avoid the VirtualizedList nesting warning.
RatingCard
RatingCard renders a FlatList of doctor cards sorted by ratings. Each card has a top row with the doctor’s avatar, a “Professional Doctor” badge, the doctor’s name and department inside a white rounded box, and a star + rating chip on the far right. The bottom row has an Info button and Calendar, QuestionMark, and Heart icon buttons.Props
Prop
Type
Default
Description
doctors
Doctor[]
—
Array of doctor objects; each must have id, avatar, name, department, and ratings
navigation
NavigationProp
—
React Navigation prop used to navigate to 'Info'
import RatingCard from '../components/RatingCard';// Typically used when the sort tab is set to "Top Rated"<RatingCard doctors={sortedByRating} navigation={navigation}/>
Favourites
Favourites is a scrollable component that switches between a Doctors tab and a Services tab via internal tab pills. In Doctors mode it reads favouriteIds from the doctors Redux slice and dispatches toggleFavourtie to add or remove a doctor. Each doctor card shows an avatar, “Professional Doctor” label, name/department info, and a “Make Appointment” button. In Services mode it renders collapsible department rows with a “Looking Doctors” CTA.Props
Prop
Type
Default
Description
favoriteTab
'DOCTORS' | 'SERVICES'
—
Active tab controlled by parent
setFavoriteTab
(tab: string) => void
—
Switches the active tab
displayDoctors
Doctor[]
—
Full doctor array (filtered internally by favouriteIds)
services
Service[]
—
Services array; each item must have a department field
expandedService
string | null
—
Department name of the currently expanded service row
setExpandedService
(dept: string | null) => void
—
Toggles the expanded service row
navigation
NavigationProp
—
Used to navigate to 'Info' and 'DepartmentDoctors'
ProfileAvatar displays the user’s profile picture (a static local asset Profileuser.png) with a circular edit button overlay in the bottom-right corner. Below the image it renders the user’s full name, fetched asynchronously from getLoggedInUser() on mount. It accepts no external props.
import ProfileAvatar from '../components/ProfileAvatar';// Place at the top of the Profile screen<ProfileAvatar />
The edit button renders a pencil icon (create-outline from Ionicons) but does not currently wire to an edit action — connect onPress at the component level if edit-photo navigation is needed.
ProfileMenuList
ProfileMenuList is a self-contained list that composes all ProfileMenuItem rows for the Profile screen. It manages its own logout confirmation modal (a bottom sheet) and handles navigation to EditProfile, Payment, Settings, PrivacyPolicy, and HelpCenter. On logout it dispatches logoutUser (thunk), shows a success snackbar via showSnackbar, and replaces the navigation stack to Auth → Login.PropsProfileMenuList accepts no external props — all navigation and Redux dispatch are handled internally.
import ProfileMenuList from '../components/ProfileMenuList';// Renders the complete profile menu including logout confirmation modal<ProfileMenuList />
ProfileMenuList relies on a Redux store with auth and snackbar slices and React Navigation context. It must be rendered inside Provider and NavigationContainer.
ProfileMenuItems
ProfileMenuItems (exported as ProfileMenuItem) is a single tappable row for the profile menu. It renders a circular icon badge (filled with colors.secondary) on the left, a text label, and an optional chevron-forward icon on the right. icon expects an Ionicons icon name string.Props
Prop
Type
Default
Description
icon
string
—
Ionicons icon name (e.g. 'person-outline', 'card-outline')
title
string
—
Row label text
onPress
() => void
—
Tap handler
showChevron
boolean
true
Whether to show the right-side chevron arrow
import ProfileMenuItem from '../components/ProfileMenuItems';<ProfileMenuItem icon="person-outline" title="Edit Profile" onPress={() => navigation.navigate('EditProfile')}/>// No chevron for destructive actions<ProfileMenuItem icon="log-out-outline" title="Logout" showChevron={false} onPress={handleLogout}/>
SettingsItem
SettingsItem is a single settings row with a custom icon node on the left, a text label, and a fixed chevron-forward Ionicon on the right. Unlike ProfileMenuItems, the icon slot accepts any ReactNode — pass an SVG, image, or icon component directly rather than an icon name string.Props
Prop
Type
Default
Description
icon
ReactNode
—
Icon rendered on the left (any renderable node)
title
string
—
Row label text
onPress
() => void
—
Tap handler
import SettingsItem from '../components/SettingsItem';import NotificationIcon from '../assets/icons/Notification.svg';import LockIcon from '../assets/icons/Lock.svg';<SettingsItem icon={<NotificationIcon width={20} height={20} />} title="Notifications" onPress={() => navigation.navigate('NotificationSettings')}/><SettingsItem icon={<LockIcon width={20} height={20} />} title="Change Password" onPress={() => navigation.navigate('ChangePassword')}/>
GlobalSnackbar is a floating, swipe-dismissible notification bar mounted once at the app root. It subscribes to the snackbar Redux slice (visible, message, type) and animates in from the right edge using Animated.spring. After 2000 ms it auto-dismisses with a slide-out animation. Users can also swipe it away horizontally (left or right) using the built-in PanResponder — a swipe past 30% of screen width or a velocity above 0.7 triggers dismissal. Background colour is determined by type:
type
Color
'success'
#4CAF50 (green)
'error'
#FF4D4F (red)
'warning' (default)
#FFA500 (orange)
PropsGlobalSnackbar takes no props — all state comes from the Redux snackbar slice.Redux integrationDispatch showSnackbar from snackBarSlice to trigger the bar:
import { showSnackbar } from '../redux/slices/snackBarSlice';// Trigger from anywhere in the appdispatch(showSnackbar({ message: 'Appointment booked!', type: 'success' }));dispatch(showSnackbar({ message: 'Something went wrong', type: 'error' }));dispatch(showSnackbar({ message: 'Check your connection', type: 'warning' }));
MountingMount GlobalSnackbar once at the root of your navigator tree so it floats above all screens:
import GlobalSnackbar from '../components/GlobalSnackbar';export default function App() { return ( <Provider store={store}> <NavigationContainer> <RootNavigator /> {/* Renders above all screens */} <GlobalSnackbar /> </NavigationContainer> </Provider> );}
GlobalSnackbar uses useSafeAreaInsets to position itself above the device’s home indicator, so it will never be hidden behind the bottom navigation bar on notched devices.
SocialButtonrenders a square icon button used for third-party authentication (Google, Facebook, Apple). It displays a provider logo image inside acolors.secondarypill with a subtle shadow. Pass a localrequire(...)or remote URI asimage.PropsimageImageSourcePropTyperequireor URI object)onPress() => void