@getsoren/react-native-design-system
v1.32.1
Published
Design System mobile
Readme
@getsoren/react-native-design-system
Design System for mobile
Installation
Basic installation:
npm:
npm install @getsoren/react-native-design-systempnpm:
pnpm add @getsoren/react-native-design-systemyarn:
yarn add @getsoren/react-native-design-systembun:
bun add @getsoren/react-native-design-systemOptional peer dependencies
If you want to use the following components, you need to install the following dependencies:
@react-native-community/datetimepickerandexpo-localizationTimePickercomponentDatePickercomponentDateRangePickercomponentDateTimePickercomponent
expo-document-picker,expo-image-picker,expo-linkingFilecomponent
expo-imageAvatarcomponentCardSuppliercomponentSelectcomponent (image options)TimeLineEventscomponent
expo-routerHeaderBackButtoncomponentModalIconButtoncomponent
expo-status-barModalcomponent
expo-mapsMapMarkerscomponent
react-native-safe-area-contextAutocompletecomponentBottomFixedButtoncomponentBottomSheetContentcomponentHeadercomponent
react-native-svgIconcomponent
expo-file-system,expo-sharing,react-native-webLightboxcomponent
@shopify/flash-listadnexpo-dev-clientAutocompletecomponentCardProductListcomponentCardProductHorizontalListcomponentCardProductLargeHorizontalListcomponentCardSupplierListcomponent
Installation with all optional dependencies
npm:
npm install @getsoren/react-native-design-system @react-native-community/datetimepicker expo-document-picker expo-image expo-image-picker expo-linking expo-localization expo-router expo-status-bar react-native-maps react-native-safe-area-context react-native-svgpnpm:
pnpm add @getsoren/react-native-design-system @react-native-community/datetimepicker expo-document-picker expo-image-picker expo-linking expo-localization expo-router expo-status-bar react-native-maps react-native-safe-area-context react-native-svgyarn:
yarn add @getsoren/react-native-design-system @react-native-community/datetimepicker expo-document-picker expo-image-picker expo-linking expo-localization expo-router expo-status-bar react-native-maps react-native-safe-area-context react-native-svgbun:
bun add @getsoren/react-native-design-system @react-native-community/datetimepicker expo-document-picker expo-image-picker expo-linking expo-localization expo-router expo-status-bar react-native-maps react-native-safe-area-context react-native-svgUsage
import { ThemeProvider } from "@getsoren/react-native-design-system";
const App = () => {
return (
<ThemeProvider>
<MyComponent />
</ThemeProvider>
);
};Load custom font
import { ThemeProvider } from "@getsoren/react-native-design-system";
import { useFonts } from "expo-font";
import * as SplashScreen from "expo-splash-screen";
const App = () => {
const [loaded, error] = useFonts({
"Poppins-Medium": require("../assets/fonts/Poppins-Medium.ttf"), // 500
"Poppins-Regular": require("../assets/fonts/Poppins-Regular.ttf"), // 400
"Poppins-SemiBold": require("../assets/fonts/Poppins-SemiBold.ttf"), // 600
});
useEffect(() => {
if (loaded || error) {
SplashScreen.hideAsync().then();
}
}, [loaded]);
if (!loaded) {
return null;
}
return (
<ThemeProvider
fonts={{
medium: "Poppins-Medium",
regular: "Poppins-Regular",
semiBold: "Poppins-SemiBold",
}}
>
<MyComponent />
</ThemeProvider>
)
};Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
