npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rn-navigation-templates

v1.0.2

Published

navigation templates for react-native

Downloads

17

Readme

rn-navigation-templates

A built-in navigation tabs and drawers for your react-native application.

Demo:

The package includes 6 different templates for navigation.

Installation

First of all, copy the command

  npm install rn-navigation-templates

Now, if you are working on expo project you have to add one line in the file called babel.config.js.

  module.exports = function (api) {
  ...
  return {
    ...
    plugins: ["react-native-reanimated/plugin"],
  };
};

Note : You have to add plugins: at the end of any text inside return keyword.

Now, you can choose the navigation template you want to add in your project.

Props:

| Component | Props | Values | Description | | :-------------------------------- | :------------------------ | :----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | <LDrawer /> <CDrawer /> | tabs profile styles | tabs - array of objects profile styles - objects | tabs should contains object name icon screen profile should contain name email image styles should contains HEADCOLOR THEME COLOR | | <BottomTabsAnimated /> | tabs styles | tabs - array of objects styles - objects | tabs should contains objects name icon screen color styles should contain only Color | | <TopTabsIconView /> | tabs styles | tabs - array of objects styles - objects | tabs should contains objects name icon screen styles should contains BOTTOMLINE BGCOLOR | | <TopTabsTextView /> | tabs styles | tabs - array of objects styles - objects | tabs should contains objects name screen styles should contains BOTTOMLINE BGCOLOR COLOR | | <BottomTabs /> | tabs styles | tabs - array of objects styles - objects | tabs should contains objects name icon focused screen styles should contain only bgColor activeColor Color |

Note: You have to pass all the props mention above for particular component, otherwise it will throw an error.

Usage:

  • LDrawer
  import React from "react";
  import Home from "./Screens/Home";
  import Settings from "./Screens/Settings";
  import Message from "./Screens/Message";
  import { FontAwesome5, Ionicons, MaterialIcons } from "@expo/vector-icons";
  import bgImage from "./assets/favicon.png";
  import { LDrawer } from "rn-navigation-templates";

  let tabs = [
    {
      name: "Home",
      icon: <FontAwesome5 name="home" size={24} color="black" />,
      screen: Home,
    },
    {
      name: "Settings",
      icon: <Ionicons name="settings" size={24} color="black" />,
      screen: Settings,
    },
    {
      name: "Message",
      icon: <MaterialIcons name="message" size={24} color="black" />,
      screen: Message,
    },
  ];

  const styles = {
    HEADCOLOR: "white",
    THEME: "yellow",
    COLOR: "black",
  };

  const profile = {
    name: "Nikhil",
    email: "[email protected]",
    image: bgImage,
  };

  export default App = () => {
    return <CDrawer profile={profile} tabs={tabs} styles={styles} />;
  };
  • BottomTabsAnimated
  import React from "react";
  import Home from "./Screens/Home";
  import Settings from "./Screens/Settings";
  import Message from "./Screens/Message";
  import { FontAwesome5, Ionicons, MaterialIcons } from "@expo/vector-icons";
  import { BottomTabsAnimated } from "rn-navigation-templates";

  let tabs = [
    {
      name: "Home",
      icon: <FontAwesome5 name="home" size={24} color="black" />,
      screen: Home,
      color: 'red'
    },
    {
      name: "Settings",
      icon: <Ionicons name="settings" size={24} color="black" />,
      screen: Settings,
      color: 'blue'
    },
    {
      name: "Message",
      icon: <MaterialIcons name="message" size={24} color="black" />,
      screen: Message,
      color: 'green'
    },
  ];

  const styles = {
    Color: 'white',
  }

  export default App = () => {
    return <BottomTabsAnimated tabs={tabs} styles={styles} />;
  };
  • TopTabsIconView
  import React from "react";
  import Home from "./Screens/Home";
  import Settings from "./Screens/Settings";
  import Message from "./Screens/Message";
  import { FontAwesome5, Ionicons, MaterialIcons } from "@expo/vector-icons";
  import { TopTabsIconView } from "rn-navigation-templates";

  let tabs = [
    {
      name: "Home",
      icon: <FontAwesome5 name="home" size={24} color="black" />,
      screen: Home,
    },
    {
      name: "Settings",
      icon: <Ionicons name="settings" size={24} color="black" />,
      screen: Settings,
    },
    {
      name: "Message",
      icon: <MaterialIcons name="message" size={24} color="black" />,
      screen: Message,
    },
  ];

  const styles = {
    BOTTOMLINE: "red",
    BGCOLOR: "yellow",
  };

  export default App = () => {
    return <TopTabsIconView tabs={tabs} styles={styles} />;
  };
  • BottomTabs
  import React from "react";
  import Home from "./Screens/Home";
  import Settings from "./Screens/Settings";
  import Message from "./Screens/Message";
  import { FontAwesome5, Ionicons, MaterialIcons } from "@expo/vector-icons";
  import { BottomTabs } from "rn-navigation-templates";

  let tabs = [
    {
      name: "Home",
      icon: <FontAwesome5 name="home" size={24} color="black" />,
      focused: <FontAwesome5 name="home" size={24} color="red" />,
      screen: Home,
    },
    {
      name: "Settings",
      icon: <Ionicons name="settings" size={24} color="black" />,
      focused: <Ionicons name="settings" size={24} color="red" />,
      screen: Settings,

    },
    {
      name: "Message",
      icon: <MaterialIcons name="message" size={24} color="black" />,
      focused: <MaterialIcons name="message" size={24} color="red" />,
      screen: Message,

    },
  ];

  const styles = {
    activeColor: "red",
    bgColor: "white",
    Color: "black",
  }

  export default App = () => {
    return <BottomTabs tabs={tabs} styles={styles} />;
  };

Author