Gathering detailed insights and metrics for sonny-ui
Gathering detailed insights and metrics for sonny-ui
Gathering detailed insights and metrics for sonny-ui
Gathering detailed insights and metrics for sonny-ui
A collection of reusable React Native utils and components optimized for Expo to speed up development
npm install sonny-ui
Typescript
Module System
Node Version
NPM Version
TypeScript (90.65%)
JavaScript (9.35%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
7 Stars
17 Commits
1 Branches
1 Contributors
Updated on Jun 22, 2025
Latest Version
0.2.11
Package Id
sonny-ui@0.2.11
Unpacked Size
190.51 kB
Size
40.59 kB
File Count
50
NPM Version
11.3.0
Node Version
23.11.0
Published on
Jun 22, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
8
A modern collection of reusable React Native components and utilities optimized for Expo SDK 50+.
Choose your preferred package manager:
1# npm 2npm install sonny-ui 3 4# yarn 5yarn add sonny-ui 6 7# pnpm 8pnpm add sonny-ui 9 10# bun 11bun add sonny-ui 12 13# expo 14npx expo install sonny-ui
Important: Backend setup is done using the CLI tool after installation, not during npm install
.
First install the library:
1npm install sonny-ui
Note: sonny-ui requires react-native-safe-area-context
as a peer dependency. If you're using Expo SDK 50+, this is usually already included. If not, install it separately:
1npm install react-native-safe-area-context
For the enhanced Text component with Google Fonts support (Poppins & Inter), install the required packages following the Expo Google Fonts guide:
1npx expo install @expo-google-fonts/poppins @expo-google-fonts/inter expo-font expo-splash-screen
Then load the fonts in your root layout (app/_layout.tsx
or App.tsx
):
1import React from 'react'; 2import { useFonts } from 'expo-font'; 3import { 4 Poppins_300Light, 5 Poppins_400Regular, 6 Poppins_500Medium, 7 Poppins_600SemiBold, 8 Poppins_700Bold, 9 Poppins_800ExtraBold, 10 Poppins_900Black, 11} from '@expo-google-fonts/poppins'; 12import { 13 Inter_300Light, 14 Inter_400Regular, 15 Inter_500Medium, 16 Inter_600SemiBold, 17 Inter_700Bold, 18 Inter_800ExtraBold, 19 Inter_900Black, 20} from '@expo-google-fonts/inter'; 21import * as SplashScreen from 'expo-splash-screen'; 22import { useEffect } from 'react'; 23 24SplashScreen.preventAutoHideAsync(); 25 26export default function RootLayout() { 27 const [fontsLoaded] = useFonts({ 28 // Poppins fonts 29 Poppins_300Light, 30 Poppins_400Regular, 31 Poppins_500Medium, 32 Poppins_600SemiBold, 33 Poppins_700Bold, 34 Poppins_800ExtraBold, 35 Poppins_900Black, 36 // Inter fonts 37 Inter_300Light, 38 Inter_400Regular, 39 Inter_500Medium, 40 Inter_600SemiBold, 41 Inter_700Bold, 42 Inter_800ExtraBold, 43 Inter_900Black, 44 }); 45 46 useEffect(() => { 47 if (fontsLoaded) { 48 SplashScreen.hideAsync(); 49 } 50 }, [fontsLoaded]); 51 52 if (!fontsLoaded) { 53 return null; 54 } 55 56 return ( 57 // Your app content 58 ); 59}
Then configure your backend(s) using the CLI:
1# Firebase setup 2npx sonny-ui setup --firebase 3 4# Supabase setup 5npx sonny-ui setup --supabase 6 7# Both backends 8npx sonny-ui setup -f -s
This will:
config/
directory.env.example
files with the required environment variablesNote: The backend configurations are optional and separate from the UI components. You can use sonny-ui components without any backend setup.
1import React from "react"; 2import { View, StyleSheet } from "react-native"; 3import { 4 MainContainer, 5 SonnyButton, 6 SonnyInput, 7 SonnyModal, 8 Text, 9 showToast, 10 SonnyToastProvider, 11} from "sonny-ui"; 12 13export default function App() { 14 const [modalVisible, setModalVisible] = React.useState(false); 15 const [name, setName] = React.useState(""); 16 17 const handleShowToast = () => { 18 showToast({ 19 type: "success", 20 title: "Welcome!", 21 message: "sonny-ui is ready to use", 22 duration: 3000, 23 }); 24 }; 25 26 return ( 27 <SonnyToastProvider> 28 <MainContainer style={styles.container}> 29 <Text 30 fontFamily="poppins" 31 fontSize={24} 32 fontWeight="700" 33 style={styles.title} 34 > 35 Welcome to sonny-ui 36 </Text> 37 38 <Text 39 fontFamily="inter" 40 fontSize={16} 41 fontWeight="400" 42 color="#6B7280" 43 style={styles.subtitle} 44 > 45 Beautiful React Native components with Google Fonts 46 </Text> 47 48 <SonnyInput 49 placeholder="Enter your name" 50 value={name} 51 onChangeText={setName} 52 leftIcon="person" 53 style={styles.input} 54 /> 55 56 <SonnyButton 57 title="Open Modal" 58 onPress={() => setModalVisible(true)} 59 variant="primary" 60 icon="modal" 61 style={styles.button} 62 /> 63 64 <SonnyModal 65 visible={modalVisible} 66 onClose={() => setModalVisible(false)} 67 showCloseButton 68 > 69 <SonnyButton 70 title="Show Toast" 71 onPress={handleShowToast} 72 variant="success" 73 icon="checkmark-circle" 74 /> 75 </SonnyModal> 76 </MainContainer> 77 </SonnyToastProvider> 78 ); 79} 80 81const styles = StyleSheet.create({ 82 container: { 83 padding: 20, 84 }, 85 title: { 86 textAlign: "center", 87 marginBottom: 10, 88 }, 89 subtitle: { 90 textAlign: "center", 91 marginBottom: 30, 92 }, 93 input: { 94 marginBottom: 20, 95 }, 96 button: { 97 marginBottom: 10, 98 }, 99});
Expo SDK | React Native | Support Status |
---|---|---|
53 | 0.79 | ✅ Fully Supported |
52 | 0.76 | ✅ Fully Supported |
51 | 0.74 | ✅ Fully Supported |
50 | 0.73 | ✅ Fully Supported |
< 50 | < 0.73 | ❌ Not Supported |
We welcome contributions! Here's how you can help:
Fork and clone the repository
1git clone https://github.com/Sonnysam/sonny-ui 2cd sonny-ui
Install dependencies
1npm install
Build the project
1npm run build
Test your changes
1npm test
main
Contributors will be:
For detailed guidelines, see our Contributing Guide.
MIT © sonnysam
Want to suggest a component or utility? Open an issue or start a discussion!
Made with ❤️ in Ghana 🇬🇭 by Samuel Agbenyo (@AgbenyoOfficial on X)
No vulnerabilities found.
No security vulnerabilities found.