Skip to main content

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.
TokenHex / RGBAUsage
colors.background#FFFFFFScreen backgrounds, card fills, snackbar text
colors.primary#2260FFButtons, headers, active chips, link text
colors.ps#2563EBAlternative primary shade (Tailwind blue-600)
colors.secondary#CAD6FFCard backgrounds, date pickers, social button fills
colors.grey#444Secondary text, toggle icon tint
colors.darkGrey#555Muted body text
colors.lightGrey#666Placeholder text, empty-state messages
colors.black#000000Primary text (names, labels)
colors.lightBlue#EEF2FFTime slot buttons, light input backgrounds
colors.mutedBlue#7E8BC7Time slot label text
colors.input#60A5FAInput accent, typed text in PasswordInput
colors.desc#4B5563Description and secondary body text
colors.reason#374151Reason / muted heading text
colors.select#809CFFPaymentInput method label text
colors.darkText#3A3A3AHigh-contrast body text
colors.modalrgba(0, 96, 199, 0.4)Modal / bottom-sheet overlay backdrop
colors.modalCancel#DCE5FFCancel button fills, inactive sort chips
colors.time#93C5FDTime display accents
colors.abrgba(255, 255, 255, 0.75)Semi-transparent white overlays
colors.v#A9BCFEChevron icon tint in ProfileMenuItem
colors.error#FF4D4FError 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',
};
ConstantFont FileNumeric WeightTypical Use
Fonts.THINLeagueSpartan-Thin100Decorative large titles
Fonts.EXTRALIGHTLeagueSpartan-ExtraLight200Subtle captions
Fonts.LIGHTLeagueSpartan-Light300Appointment time text, secondary labels
Fonts.REGULARLeagueSpartan-Regular400Body text, input values
Fonts.MEDIUMLeagueSpartan-Medium500Button labels, field labels, card names
Fonts.SEMIBOLDLeagueSpartan-SemiBold600Screen titles, headers
Fonts.BOLDLeagueSpartan-Bold700Emphasis, highlighted values
Fonts.EXTRABOLDLeagueSpartan-ExtraBold800Hero text
Fonts.BLACKLeagueSpartan-Black900Display-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
TokenValue (dp)Where used
typography.subtitleSize12Captions, metadata
typography.smallDate13Date pills
typography.bodySize14General body text
typography.doctorTitle15Doctor name on cards
typography.headerDoctorName18Doctor name in headers
typography.m24Section heading text
typography.titleSize48Onboarding / splash hero
Font family aliases
TokenResolves toNumeric weight
typography.fontLightFonts.LIGHT300
typography.fontMediumFonts.MEDIUM500
typography.fontSemiboldFonts.SEMIBOLD600
Font weight strings
TokenValueDescription
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
TokenValueDescription
spacing.z0Zero (explicit zero gap / radius)
spacing.a1Unit — also used as flex 1
spacing.b2Micro gap / border width
spacing.ss4Extra-small padding
spacing.ms5Near-small gap
spacing.sSub8Small sub-unit padding
spacing.s10Small padding / margin
spacing.sm15Small-medium
spacing.m20Medium (base unit)
spacing.ml25Medium-large
spacing.l30Large (icon buttons, circular radius)
spacing.lg40Large-gap (section separation)
spacing.xl50Extra-large (button heights, list gaps)
spacing.xxl50Alias for xl
spacing.xxxl60Triple-extra-large
spacing.bottomPadding70Bottom scroll padding
Border radius scale
TokenValueDescription
spacing.radiusSmCard18Small card / input container corner radius
spacing.radiusCard22Standard card corner radius
spacing.radiusBadge15Badge and chip radius
spacing.radiusCircle40Full circular avatar / icon button
spacing.radiusActionBtn14Action button pill radius
Responsive percentage dimensions
TokenValueDescription
spacing.ssmhp(7)Small screen height unit
spacing.logoWidthwp('45%')Onboarding logo width
spacing.logoHeighthp('18%')Onboarding logo height
spacing.descWidthwp('80%')Description text max width
spacing.plgwp(85)Large percentage-width container
spacing.btnWidthwp('60%')Default button width
spacing.inputContainerWidth'63%'Inline percentage used for specific input containers
spacing.doctorCardWidth'85%'Doctor card width string
spacing.circleBtnWidthwp(6)Circular button width
spacing.circleBtnHeighthp(2.5)Circular button height
spacing.scheduleDateCardWidthwp(12)Date card width on schedule screen
spacing.setPasswordBtnWidthwp('70%')Set-password screen button width
spacing.addcardWidthwp(68)Add-card screen input width
spacing.socialBtnSizewp('12%')Social login button diameter
spacing.socialBtnRadiuswp('7.5%')Social button border radius
spacing.headerBackWidthwp('5%')Header back button touch target width
spacing.headerSideWidthwp('10%')Header right side placeholder width
spacing.signUpFormWidthwp('75%')Sign-up form width
spacing.signUpBtnWidthwp('65%')Sign-up screen button width
spacing.signUpLoginMarginTophp('6%')Sign-up “login” link top margin
spacing.signUpDtsMarginTophp('4%')Sign-up details section top margin
spacing.inputWrapperPaddingBottomhp('1.8%')CustomInput outer wrapper bottom padding
spacing.inputContainerPaddingHorizontalwp('4%')CustomInput container horizontal padding
spacing.inputIconMarginwp('3%')CustomInput icon spacing
spacing.helpSearchHeighthp(5)Help center search bar height
spacing.helpTabWidthwp('35%')Help center tab pill width
Vertically scaled values
TokenValueDescription
spacing.vsLgverticalScale(60)Large vertical spacing offset
spacing.vsMdverticalScale(20)Medium vertical spacing offset
spacing.editheightvs(25)Profile avatar edit button height (vertically scaled)
spacing.editwidthms(28)Profile avatar edit button width (moderately scaled)
spacing.bottomSheetMarginBottomvs(39)Logout bottom-sheet margin from bottom
spacing.modalHorizontalPaddingms(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.
TokenValueDescription
spacing.dateCardWidthwp(11)Calendar date card width
spacing.avatarLargeWidth120Large avatar image width
spacing.calendarCardWidth280Full calendar card width
spacing.badgeIconSize16Badge and small icon font size
spacing.downArrowSize12Dropdown arrow / small text size
spacing.timeBtnHeight38Time-slot button height
spacing.problemInputHeight140Problem description textarea height
spacing.bookBtnWidth200Book appointment button width
spacing.appointmentAvatarWidth75Doctor avatar on appointment cards
spacing.cardRatingWidth45Rating chip width
spacing.monthPillWidth140Month selector pill width
spacing.cancelInputMinHeight100Cancellation reason input minimum height
spacing.apptDoctorImageWidth62Doctor image on appointment screen
spacing.apptDoctorImagePadding32Padding around appointment doctor image
spacing.apptHeartChipWidth26Heart chip size on appointment screen
spacing.apptCircleBtnWidth35Appointment circle button width
spacing.apptCircleBtnRadius19Appointment circle button radius
spacing.apptCircleSize34Appointment circle indicator size
spacing.apptCircleRadius17Appointment circle indicator radius
spacing.cardPreviewHeight180Add-card screen preview height
spacing.chipIconSize32Icon chip size (e.g. sort chips)
spacing.chatHeaderBackSize26Chat screen back icon size
spacing.updateBtnWidth207Edit profile update button width
spacing.helpBackIconSize28Help center back icon size
spacing.helpCategoryWidth95Help category chip width
spacing.helpCategoryMarginHorizontal35Help category chip horizontal margin
spacing.notifIconContainerSize42Notification icon container size
spacing.notifIconContainerRadius21Notification icon container border radius
spacing.toggleThumbSize28Notification settings toggle thumb size
spacing.toggleRowMarginBottom28Notification settings row bottom margin
spacing.reviewActionBtnWidth220Review screen action button width
spacing.socialIconSize23Social button inner icon size
spacing.docHeaderCircleSize36DoctorsHeader search/filter icon circle size
spacing.favDoctorImageSize65Favourites doctor card avatar size
spacing.headerSettingsIconSize24Header right settings icon size
spacing.profileWidth100ProfileAvatar image width
spacing.imgbrdradi90ProfileAvatar image border radius
spacing.ratingCardImageSize70RatingCard doctor avatar size
spacing.ratingCardImageRadius35RatingCard 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().

Build docs developers (and LLMs) love