1.0.81 • Published 10 days ago

@browntreebear/reactnativesharedui v1.0.81

Weekly downloads
-
License
ISC
Repository
github
Last release
10 days ago

React Native Shared UI

React Native Shared UI is a collection of reusable UI components designed to streamline the development of your React Native applications. This library simplifies the process of creating consistent and stylish user interfaces across different platforms.

Installation

To get started, you can install the package via npm:

npm install @browntreebear/reactnativesharedui

NOTE: any component used from the folder /animations (such as NowPlayingTabBar) has a react-native-gesture-handler dependency. You must wrap your overall application in the GestureHandlerRootView in order to have the animations work properly. React Native Gesture Handler -> documentation

Available Scripts

  • start: Start the Expo development server.
npm start
  • ios: Start the Expo development server in ios.
npm run ios
  • type-check: Run typescript check.
npm run type-check

Components (Non Animated)

-Buttons

import { AppButton } from '@browntreebear/reactnativesharedui/components'

<AppButton 
    // Some optional styling you can send to the button
    optionalStyling={{ alignSelf: 'center' }}  
    text="Logout" // <- Button Text
    onPress={() => {}} // <- Button action
    buttonStyle={{ backGroundColor: "#255433", textColor: "#E0E0E0" }}
/>

-Loaders

import { FullScreenLoader, ApplicationLoader, PageLoader } 
from '@browntreebear/reactnativesharedui/components'

<ApplicationLoader/>
<PageLoader loaderColor="white"/>
<FullScreenLoader loaderColor="grey" visible={true}/>

Components (Animated)

Note: Application must be wrapped in from the 'react-native-gesture-handler' package listed above in order to use these components

-NowPlayingTabBar

  • note: this was built with routing built on @react-navigation/native -make sure content above (each tab) the nav bar has a style of flex: 1 to push the navbar to the bottom of the page
import { NowPlayingTabBar } 
from '@browntreebear/reactnativesharedui/animations'

const tabs = [
    {
        name: 'Home',
        item: Any React node icon works here. . I use Iconicons,
    },
    {
        name: 'MyList',
        item: <Iconicons color="black" size={25} name="list-outline" />,
    },
    {
        name: 'Settings',
        item: <Iconicons color="black" size={25} name="people-outline" />,
    }

<NavigationContent>
    <View style={{ flex: 1 }}>
        {state.routes.map((route, i) => {
            const isHidden = shouldHideTabBar(route.name);
            const isCurrentTab = i === state.index;
                return (
                    <View
                        key={route.key}
                        style={[
                            StyleSheet.absoluteFill,
                        { display: isHidden ? 'none' : 'flex' },
                        { zIndex: isCurrentTab ? 1 : 0 },
                    ]}
                    >
                    {isCurrentTab && descriptors[route.key].render()}
                </View>
            )
        })}
    </View>
    <View style={styles.tabBar}>
        <NowPlayingTabBar 
            tabs={tabs} 
            onTabChange={handleTabNavigation} 
            backGroundColor="#10001A" 
        />
    </View>
</NavigationContent>

Tab Navigation Component

-FadeView -this just fades in and out the child component (for the duration set)

import { FadeView } from '@browntreebear/reactnativesharedui/animations'

<FadeView duration={1200}>
    <Text>Fadin in and out babbey</Text>
</FadeView> 

-AnimatedInput -this input animates the placeholder above the text input when the user selects

import { AnimatedInput } from '@browntreebear/reactnativesharedui/animations'

<AnimatedInput
    placeholder='Enter your password'
    value={inputValue}
    inputColor="black"
    optionalStyling={{ marginTop: 8 }}
    obviscateText={true}
    onChangeText={(text) => setInputValue(text)}
/>

Animated Input Component

1.0.81

10 days ago

1.0.80

2 months ago

1.0.79

2 months ago

1.0.77

3 months ago

1.0.78

3 months ago

1.0.76

3 months ago

1.0.75

3 months ago

1.0.74

3 months ago

1.0.73

3 months ago

1.0.72

3 months ago

1.0.71

3 months ago

1.0.69

3 months ago

1.0.68

3 months ago

1.0.70

3 months ago

1.0.66

3 months ago

1.0.65

3 months ago

1.0.64

3 months ago

1.0.67

3 months ago

1.0.63

3 months ago

1.0.62

4 months ago

1.0.61

4 months ago

1.0.60

4 months ago

1.0.55

4 months ago

1.0.59

4 months ago

1.0.58

4 months ago

1.0.57

4 months ago

1.0.56

4 months ago

1.0.44

4 months ago

1.0.43

4 months ago

1.0.42

4 months ago

1.0.48

4 months ago

1.0.47

4 months ago

1.0.46

4 months ago

1.0.45

4 months ago

1.0.49

4 months ago

1.0.51

4 months ago

1.0.50

4 months ago

1.0.54

4 months ago

1.0.53

4 months ago

1.0.52

4 months ago

1.0.39

4 months ago

1.0.38

4 months ago

1.0.40

4 months ago

1.0.41

4 months ago

1.0.37

4 months ago

1.0.36

4 months ago

1.0.35

4 months ago

1.0.34

4 months ago

1.0.33

4 months ago

1.0.32

4 months ago

1.0.26

4 months ago

1.0.29

4 months ago

1.0.28

4 months ago

1.0.27

4 months ago

1.0.31

4 months ago

1.0.30

4 months ago

1.0.22

4 months ago

1.0.21

4 months ago

1.0.20

4 months ago

1.0.25

4 months ago

1.0.24

4 months ago

1.0.23

4 months ago

1.0.19

4 months ago

1.0.18

4 months ago

1.0.17

4 months ago

1.0.16

4 months ago

1.0.15

4 months ago

1.0.14

4 months ago

1.0.13

4 months ago

1.0.12

4 months ago

1.0.11

4 months ago

1.0.10

4 months ago

1.0.9

4 months ago

1.0.8

4 months ago

1.0.7

4 months ago

1.0.6

4 months ago

1.0.4

4 months ago

1.0.3

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago