Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Jay-byte389/AMS/llms.txt
Use this file to discover all available pages before exploring further.
AMS centralises all visual decisions — colors, typefaces, font sizes, font weights, and spacing — into a set of plain JavaScript constant files under src/constants/. Components import these tokens directly rather than hard-coding values, ensuring that a single change ripples consistently across every screen. All sizing values work alongside react-native-size-matters (ms, s, vs) for responsive adaptation across device densities.
Colors
All color values are exported from src/constants/colors.js as the named export colors.
| Token | Hex / RGBA | Usage |
|---|
colors.background | #FFFFFF | Screen backgrounds, card fills, snackbar text |
colors.primary | #2260FF | Buttons, headers, active chips, link text |
colors.ps | #2563EB | Alternative primary shade (Tailwind blue-600) |
colors.secondary | #CAD6FF | Card backgrounds, date pickers, social button fills |
colors.grey | #444 | Secondary text, toggle icon tint |
colors.darkGrey | #555 | Muted body text |
colors.lightGrey | #666 | Placeholder text, empty-state messages |
colors.black | #000000 | Primary text (names, labels) |
colors.lightBlue | #EEF2FF | Time slot buttons, light input backgrounds |
colors.mutedBlue | #7E8BC7 | Time slot label text |
colors.input | #60A5FA | Input accent, typed text in PasswordInput |
colors.desc | #4B5563 | Description and secondary body text |
colors.reason | #374151 | Reason / muted heading text |
colors.select | #809CFF | PaymentInput method label text |
colors.darkText | #3A3A3A | High-contrast body text |
colors.modal | rgba(0, 96, 199, 0.4) | Modal / bottom-sheet overlay backdrop |
colors.modalCancel | #DCE5FF | Cancel button fills, inactive sort chips |
colors.time | #93C5FD | Time display accents |
colors.ab | rgba(255, 255, 255, 0.75) | Semi-transparent white overlays |
colors.v | #A9BCFE | Chevron icon tint in ProfileMenuItem |
colors.error | #FF4D4F | Error states, error snackbar background |
// src/constants/colors.js
export const colors = {
background: '#FFFFFF',
primary: '#2260FF',
ps: '#2563EB',
secondary: '#CAD6FF',
grey: '#444',
darkGrey: '#555',
lightGrey: '#666',
black: '#000000',
lightBlue: '#EEF2FF',
mutedBlue: '#7E8BC7',
input: '#60A5FA',
desc: '#4B5563',
reason: '#374151',
select: '#809CFF',
darkText: '#3A3A3A',
modal: 'rgba(0, 96, 199, 0.4)',
modalCancel: '#DCE5FF',
time: '#93C5FD',
ab: 'rgba(255, 255, 255, 0.75)',
v: '#A9BCFE',
error: '#FF4D4F',
};
Fonts
AMS uses the League Spartan variable typeface. Each weight variant is mapped to a named constant in src/constants/Fonts.js and used as a fontFamily value throughout StyleSheet.create calls. League Spartan must be linked into the project’s native font assets.
// src/constants/Fonts.js
export const Fonts = {
THIN: 'LeagueSpartan-Thin',
EXTRALIGHT: 'LeagueSpartan-ExtraLight',
LIGHT: 'LeagueSpartan-Light',
REGULAR: 'LeagueSpartan-Regular',
MEDIUM: 'LeagueSpartan-Medium',
SEMIBOLD: 'LeagueSpartan-SemiBold',
BOLD: 'LeagueSpartan-Bold',
EXTRABOLD: 'LeagueSpartan-ExtraBold',
BLACK: 'LeagueSpartan-Black',
};
| Constant | Font File | Numeric Weight | Typical Use |
|---|
Fonts.THIN | LeagueSpartan-Thin | 100 | Decorative large titles |
Fonts.EXTRALIGHT | LeagueSpartan-ExtraLight | 200 | Subtle captions |
Fonts.LIGHT | LeagueSpartan-Light | 300 | Appointment time text, secondary labels |
Fonts.REGULAR | LeagueSpartan-Regular | 400 | Body text, input values |
Fonts.MEDIUM | LeagueSpartan-Medium | 500 | Button labels, field labels, card names |
Fonts.SEMIBOLD | LeagueSpartan-SemiBold | 600 | Screen titles, headers |
Fonts.BOLD | LeagueSpartan-Bold | 700 | Emphasis, highlighted values |
Fonts.EXTRABOLD | LeagueSpartan-ExtraBold | 800 | Hero text |
Fonts.BLACK | LeagueSpartan-Black | 900 | Display-weight headings |
Typography
Semantic size and weight aliases are exported from src/constants/typography.js. Components that need a consistent type scale import from here rather than hard-coding raw pixel values.
// src/constants/typography.js
import { Fonts } from './Fonts';
export const typography = {
// Font Sizes (in dp)
titleSize: 48, // Hero / onboarding titles
subtitleSize: 12, // Caption and label text
bodySize: 14, // Standard body copy
smallDate: 13, // Compact date chips
doctorTitle: 15, // Doctor name on listing cards
headerDoctorName: 18, // Doctor name in screen headers
m: 24, // Medium emphasis (section headings)
// Font Families
fontLight: Fonts.LIGHT,
fontMedium: Fonts.MEDIUM,
fontSemibold: Fonts.SEMIBOLD,
// Font Weights (as CSS/RN weight strings)
thinWeight: '100',
semiBoldWeight: '200', // Note: maps to numeric 200 in the source
lightWeight: '300',
regularWeight: '400',
mediumWeight: '500',
boldWeight: '700',
};
Size scale at a glance
| Token | Value (dp) | Where used |
|---|
typography.subtitleSize | 12 | Captions, metadata |
typography.smallDate | 13 | Date pills |
typography.bodySize | 14 | General body text |
typography.doctorTitle | 15 | Doctor name on cards |
typography.headerDoctorName | 18 | Doctor name in headers |
typography.m | 24 | Section heading text |
typography.titleSize | 48 | Onboarding / splash hero |
Font family aliases
| Token | Resolves to | Numeric weight |
|---|
typography.fontLight | Fonts.LIGHT | 300 |
typography.fontMedium | Fonts.MEDIUM | 500 |
typography.fontSemibold | Fonts.SEMIBOLD | 600 |
Font weight strings
| Token | Value | Description |
|---|
typography.thinWeight | '100' | Thin |
typography.semiBoldWeight | '200' | Mapped to '200' in source (not '600') |
typography.lightWeight | '300' | Light |
typography.regularWeight | '400' | Regular |
typography.mediumWeight | '500' | Medium |
typography.boldWeight | '700' | Bold |
Raw pixel values in typography.js are not wrapped in ms() or s(). Apply react-native-size-matters scaling at the component level when you need the text to adapt across device sizes.
Spacing
All spacing, sizing, and layout constants are exported from src/constants/spacing.js as the named export spacing. The file mixes three categories: raw numeric values (used as dp sizes), percentage-based dimensions computed via react-native-responsive-screen (wp, hp), and vertically scaled values from react-native-size-matters (verticalScale).
Core numeric scale
| Token | Value | Description |
|---|
spacing.z | 0 | Zero (explicit zero gap / radius) |
spacing.a | 1 | Unit — also used as flex 1 |
spacing.b | 2 | Micro gap / border width |
spacing.ss | 4 | Extra-small padding |
spacing.ms | 5 | Near-small gap |
spacing.sSub | 8 | Small sub-unit padding |
spacing.s | 10 | Small padding / margin |
spacing.sm | 15 | Small-medium |
spacing.m | 20 | Medium (base unit) |
spacing.ml | 25 | Medium-large |
spacing.l | 30 | Large (icon buttons, circular radius) |
spacing.lg | 40 | Large-gap (section separation) |
spacing.xl | 50 | Extra-large (button heights, list gaps) |
spacing.xxl | 50 | Alias for xl |
spacing.xxxl | 60 | Triple-extra-large |
spacing.bottomPadding | 70 | Bottom scroll padding |
Border radius scale
| Token | Value | Description |
|---|
spacing.radiusSmCard | 18 | Small card / input container corner radius |
spacing.radiusCard | 22 | Standard card corner radius |
spacing.radiusBadge | 15 | Badge and chip radius |
spacing.radiusCircle | 40 | Full circular avatar / icon button |
spacing.radiusActionBtn | 14 | Action button pill radius |
Responsive percentage dimensions
| Token | Value | Description |
|---|
spacing.ssm | hp(7) | Small screen height unit |
spacing.logoWidth | wp('45%') | Onboarding logo width |
spacing.logoHeight | hp('18%') | Onboarding logo height |
spacing.descWidth | wp('80%') | Description text max width |
spacing.plg | wp(85) | Large percentage-width container |
spacing.btnWidth | wp('60%') | Default button width |
spacing.inputContainerWidth | '63%' | Inline percentage used for specific input containers |
spacing.doctorCardWidth | '85%' | Doctor card width string |
spacing.circleBtnWidth | wp(6) | Circular button width |
spacing.circleBtnHeight | hp(2.5) | Circular button height |
spacing.scheduleDateCardWidth | wp(12) | Date card width on schedule screen |
spacing.setPasswordBtnWidth | wp('70%') | Set-password screen button width |
spacing.addcardWidth | wp(68) | Add-card screen input width |
spacing.socialBtnSize | wp('12%') | Social login button diameter |
spacing.socialBtnRadius | wp('7.5%') | Social button border radius |
spacing.headerBackWidth | wp('5%') | Header back button touch target width |
spacing.headerSideWidth | wp('10%') | Header right side placeholder width |
spacing.signUpFormWidth | wp('75%') | Sign-up form width |
spacing.signUpBtnWidth | wp('65%') | Sign-up screen button width |
spacing.signUpLoginMarginTop | hp('6%') | Sign-up “login” link top margin |
spacing.signUpDtsMarginTop | hp('4%') | Sign-up details section top margin |
spacing.inputWrapperPaddingBottom | hp('1.8%') | CustomInput outer wrapper bottom padding |
spacing.inputContainerPaddingHorizontal | wp('4%') | CustomInput container horizontal padding |
spacing.inputIconMargin | wp('3%') | CustomInput icon spacing |
spacing.helpSearchHeight | hp(5) | Help center search bar height |
spacing.helpTabWidth | wp('35%') | Help center tab pill width |
Vertically scaled values
| Token | Value | Description |
|---|
spacing.vsLg | verticalScale(60) | Large vertical spacing offset |
spacing.vsMd | verticalScale(20) | Medium vertical spacing offset |
spacing.editheight | vs(25) | Profile avatar edit button height (vertically scaled) |
spacing.editwidth | ms(28) | Profile avatar edit button width (moderately scaled) |
spacing.bottomSheetMarginBottom | vs(39) | Logout bottom-sheet margin from bottom |
spacing.modalHorizontalPadding | ms(35) | Logout modal horizontal padding |
Component-specific size tokens
These tokens are defined close to the components that use them and are not part of the core scale. Reference them by name when styling the corresponding component.
| Token | Value | Description |
|---|
spacing.dateCardWidth | wp(11) | Calendar date card width |
spacing.avatarLargeWidth | 120 | Large avatar image width |
spacing.calendarCardWidth | 280 | Full calendar card width |
spacing.badgeIconSize | 16 | Badge and small icon font size |
spacing.downArrowSize | 12 | Dropdown arrow / small text size |
spacing.timeBtnHeight | 38 | Time-slot button height |
spacing.problemInputHeight | 140 | Problem description textarea height |
spacing.bookBtnWidth | 200 | Book appointment button width |
spacing.appointmentAvatarWidth | 75 | Doctor avatar on appointment cards |
spacing.cardRatingWidth | 45 | Rating chip width |
spacing.monthPillWidth | 140 | Month selector pill width |
spacing.cancelInputMinHeight | 100 | Cancellation reason input minimum height |
spacing.apptDoctorImageWidth | 62 | Doctor image on appointment screen |
spacing.apptDoctorImagePadding | 32 | Padding around appointment doctor image |
spacing.apptHeartChipWidth | 26 | Heart chip size on appointment screen |
spacing.apptCircleBtnWidth | 35 | Appointment circle button width |
spacing.apptCircleBtnRadius | 19 | Appointment circle button radius |
spacing.apptCircleSize | 34 | Appointment circle indicator size |
spacing.apptCircleRadius | 17 | Appointment circle indicator radius |
spacing.cardPreviewHeight | 180 | Add-card screen preview height |
spacing.chipIconSize | 32 | Icon chip size (e.g. sort chips) |
spacing.chatHeaderBackSize | 26 | Chat screen back icon size |
spacing.updateBtnWidth | 207 | Edit profile update button width |
spacing.helpBackIconSize | 28 | Help center back icon size |
spacing.helpCategoryWidth | 95 | Help category chip width |
spacing.helpCategoryMarginHorizontal | 35 | Help category chip horizontal margin |
spacing.notifIconContainerSize | 42 | Notification icon container size |
spacing.notifIconContainerRadius | 21 | Notification icon container border radius |
spacing.toggleThumbSize | 28 | Notification settings toggle thumb size |
spacing.toggleRowMarginBottom | 28 | Notification settings row bottom margin |
spacing.reviewActionBtnWidth | 220 | Review screen action button width |
spacing.socialIconSize | 23 | Social button inner icon size |
spacing.docHeaderCircleSize | 36 | DoctorsHeader search/filter icon circle size |
spacing.favDoctorImageSize | 65 | Favourites doctor card avatar size |
spacing.headerSettingsIconSize | 24 | Header right settings icon size |
spacing.profileWidth | 100 | ProfileAvatar image width |
spacing.imgbrdradi | 90 | ProfileAvatar image border radius |
spacing.ratingCardImageSize | 70 | RatingCard doctor avatar size |
spacing.ratingCardImageRadius | 35 | RatingCard doctor avatar border radius |
Border
src/constants/border.js is currently empty — no border constants are defined. Any border styles in components are either inlined or derived from spacing radius tokens. Refer to the Border radius scale table in the Spacing section above for all shared radius values.
How to Use Tokens
Import whichever token files a component needs and reference the constants in StyleSheet.create. Combining spacing with react-native-size-matters scalers gives both a consistent baseline and fluid device adaptation.
import { StyleSheet } from 'react-native';
import { ms, s, vs } from 'react-native-size-matters';
import { colors } from '../constants/colors';
import { Fonts } from '../constants/Fonts';
import { spacing } from '../constants/spacing';
import { typography } from '../constants/typography';
const MyCard = ({ title, subtitle }) => (
<View style={styles.card}>
<Text style={styles.title}>{title}</Text>
<Text style={styles.subtitle}>{subtitle}</Text>
</View>
);
const styles = StyleSheet.create({
card: {
backgroundColor: colors.secondary,
borderRadius: spacing.radiusCard, // 22 dp
padding: spacing.m, // 20 dp
marginBottom: spacing.s, // 10 dp
},
title: {
fontFamily: Fonts.SEMIBOLD,
fontSize: ms(typography.headerDoctorName), // 18 dp, scaled
color: colors.primary,
fontWeight: typography.mediumWeight, // '500'
},
subtitle: {
fontFamily: Fonts.REGULAR,
fontSize: ms(typography.bodySize), // 14 dp, scaled
color: colors.grey,
marginTop: spacing.b, // 2 dp
},
});
AMS uses react-native-size-matters helpers — ms() (moderate scale), s() (scale), and vs() (vertical scale) — on top of the raw spacing values for layouts that need to adapt across small phones and large tablets. A good rule of thumb: wrap font sizes with ms(), horizontal paddings with s(), and vertical paddings or heights with vs().