Skip to content

React Native project templates for use with the Brightlayer UI CLI

Notifications You must be signed in to change notification settings

etn-ccis/blui-react-native-cli-templates

Repository files navigation

Build

React Native CLI Templates

These are project templates that are used by the React Native CLI when starting a new Brightlayer UI project.

Available Templates

Blank

The Blank template provides a bare-bones application with Brightlayer UI components and themes automatically configured and ready to use.

Routing

The Routing template provides all of the essential Brightlayer UI configuration as well as additional configuration for using React Navigation. It also adds a navigation Drawer to switch between several sample screens.

Authentication

The Authentication template includes everything from the Routing template and also installs and configures the Brightlayer UI react-native-auth-workflow package to automatically wrap the main application with functions and screens for Login, Registration, Change Password, etc.

placeholder landing page navigation drawer & routing login & registration screens
Blank
Routing
Authentication

Screenshots

Blank Template

blank typescript

Routing Template With Collapsed Drawer

blank typescript

Routing Template With Expanded Drawer

blank typescript

Authentication Template Login Page

blank typescript

Usage

To create a new project using the Template simply run (recommended):

npx react-native init MyApp --template @brightlayer-ui/react-native-template-blank-typescript
npx react-native init MyApp --template @brightlayer-ui/react-native-template-routing-typescript
npx react-native init MyApp --template @brightlayer-ui/react-native-template-authentication-typescript

Testing

to test a template go inside the template folder and run command

cd <template-name>/template
yarn install
cd ios && pod install
cd ..
yarn android/ios

Once you have tested make sure to delete Node modules, Pods and build folder for both android and ios

to check the template is working with react native cli

npx react-native init myapp --template file:///the-path-to-location/blui-react-native-cli-templates/blank-typescript