Profile Stats Card
Detailed professional profile card with stats grid, bio, and action buttons.
Live preview. Clicks work like taps.
Add it in 3 steps
Copy the code yourself and see every line.
- 1
Install what it needs
Expo picks versions that match your app.Terminal$ npx expo install expo-vector-icons @expo/vector-icons - 2
Copy the component
Make a new file, for examplecomponents/ProfileCard.tsx, and paste this in.components/ProfileCard.tsx1import React from 'react'; 2import { StyleSheet, Text, View, Image, TouchableOpacity, Dimensions } from 'react-native'; 3import { MaterialCommunityIcons } from '@expo/vector-icons'; 4 5const { width } = Dimensions.get('window'); 6 7const ProfileCard = ({ 8 name = "Natasha Romanoff", 9 title = "Brand Designer", 10 location = "London", 11 bio = "I'm a brand designer who blends sharp strategy with bold creativity to craft identities that leave lasting impressions.", 12 projects = "50", 13 earnings = "$35k+", 14 rating = "4.5", 15 avatarUrl = "https://i.pravatar.cc/150?u=natasha", // Placeholder 16 onHirePress, 17 onMessagePress 18}) => { 19 return ( 20 <View style={styles.cardContainer}> 21 {/* Header Section */} 22 <View style={styles.header}> 23 <Image source={{ uri: avatarUrl }} style={styles.avatar} /> 24 <View style={styles.headerText}> 25 <Text style={styles.nameText}>{name}</Text> 26 <Text style={styles.titleText}>{title} • {location}</Text> 27 </View> 28 </View> 29 30 {/* Bio Section */} 31 <Text style={styles.bioText}>{bio}</Text> 32 33 {/* Stats Section */} 34 <View style={styles.statsContainer}> 35 <View style={styles.statBox}> 36 <Text style={styles.statLabel}>Projects</Text> 37 <Text style={styles.statValue}>{projects}</Text> 38 </View> 39 40 <View style={styles.divider} /> 41 42 <View style={styles.statBox}> 43 <Text style={styles.statLabel}>Earnings</Text> 44 <Text style={styles.statValue}>{earnings}</Text> 45 </View> 46 47 <View style={styles.divider} /> 48 49 <View style={styles.statBox}> 50 <Text style={styles.statLabel}>Rating</Text> 51 <View style={styles.ratingRow}> 52 <MaterialCommunityIcons name="star" size={16} color="#E67E22" /> 53 <Text style={styles.statValue}> {rating}</Text> 54 </View> 55 </View> 56 </View> 57 58 {/* Action Buttons */} 59 <View style={styles.buttonRow}> 60 <TouchableOpacity 61 style={[styles.button, styles.primaryButton]} 62 onPress={onHirePress} 63 activeOpacity={0.8} 64 > 65 <Text style={styles.primaryButtonText}>Hire now</Text> 66 </TouchableOpacity> 67 68 <TouchableOpacity 69 style={[styles.button, styles.secondaryButton]} 70 onPress={onMessagePress} 71 activeOpacity={0.8} 72 > 73 <Text style={styles.secondaryButtonText}>Message</Text> 74 </TouchableOpacity> 75 </View> 76 </View> 77 ); 78}; 79 80const styles = StyleSheet.create({ 81 cardContainer: { 82 backgroundColor: '#FFFFFF', 83 borderRadius: 24, 84 padding: 24, 85 width: width * 0.9, 86 alignSelf: 'center', 87 // Shadow for iOS 88 shadowColor: '#000', 89 shadowOffset: { width: 0, height: 10 }, 90 shadowOpacity: 0.1, 91 shadowRadius: 20, 92 // Elevation for Android 93 elevation: 5, 94 }, 95 header: { 96 flexDirection: 'row', 97 alignItems: 'center', 98 marginBottom: 20, 99 }, 100 avatar: { 101 width: 48, 102 height: 48, 103 borderRadius: 12, 104 backgroundColor: '#f0f0f0', 105 }, 106 headerText: { 107 marginLeft: 12, 108 }, 109 nameText: { 110 fontSize: 18, 111 fontWeight: '700', 112 color: '#1A1A1A', 113 letterSpacing: -0.5, 114 }, 115 titleText: { 116 fontSize: 14, 117 color: '#666666', 118 marginTop: 2, 119 }, 120 bioText: { 121 fontSize: 15, 122 lineHeight: 22, 123 color: '#333333', 124 marginBottom: 24, 125 }, 126 statsContainer: { 127 flexDirection: 'row', 128 justifyContent: 'space-between', 129 alignItems: 'center', 130 marginBottom: 24, 131 paddingHorizontal: 10, 132 }, 133 statBox: { 134 flex: 1, 135 alignItems: 'flex-start', 136 }, 137 statLabel: { 138 fontSize: 13, 139 color: '#888888', 140 marginBottom: 4, 141 }, 142 statValue: { 143 fontSize: 16, 144 fontWeight: '700', 145 color: '#1A1A1A', 146 }, 147 ratingRow: { 148 flexDirection: 'row', 149 alignItems: 'center', 150 }, 151 divider: { 152 width: 1, 153 height: 30, 154 backgroundColor: '#E5E5E5', 155 marginHorizontal: 15, 156 }, 157 buttonRow: { 158 flexDirection: 'row', 159 gap: 12, 160 }, 161 button: { 162 flex: 1, 163 height: 48, 164 borderRadius: 12, 165 justifyContent: 'center', 166 alignItems: 'center', 167 }, 168 primaryButton: { 169 backgroundColor: '#1A1A1A', 170 }, 171 primaryButtonText: { 172 color: '#FFFFFF', 173 fontSize: 15, 174 fontWeight: '600', 175 }, 176 secondaryButton: { 177 backgroundColor: '#F2F2F2', 178 }, 179 secondaryButtonText: { 180 color: '#1A1A1A', 181 fontSize: 15, 182 fontWeight: '600', 183 }, 184}); 185 186export default ProfileCard; - 3
Use it
Import it on any page. Change the options to make it your own.page.tsx1import React from 'react'; 2import { View, StyleSheet, SafeAreaView } from 'react-native'; 3import ProfileCard from './components/ProfileCard'; 4 5export default function App() { 6 return ( 7 <SafeAreaView style={styles.container}> 8 <View style={styles.centered}> 9 <ProfileCard 10 onHirePress={() => console.log('Hire Pressed')} 11 onMessagePress={() => console.log('Message Pressed')} 12 /> 13 </View> 14 </SafeAreaView> 15 ); 16} 17 18const styles = StyleSheet.create({ 19 container: { 20 flex: 1, 21 backgroundColor: '#E5E5E5', 22 }, 23 centered: { 24 flex: 1, 25 justifyContent: 'center', 26 alignItems: 'center', 27 }, 28});
