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

react-native-easy-breadcrumbs

v1.12.0

Published

Android / ios package to create customizable breadcrumbs to use in react native projects

Downloads

22

Readme

react-native-easy-breadcrumbs

standard-readme compliant

Android / ios package to create customizable breadcrumbs to use in react native projects

No need to re-invent the wheel. Its already been done. Just use it and take advantage of open source projects.

Usefull for exemple, let's say we are using this library to create a breadcrumbs to navigate between folders

Table of Contents

Install

Make sure you have node and instaled globaly. And just run this command

npm i react-native-easy-breadcrumbs

Usage

Import this module:

import { Crumb, EasyBreadcrumb } from 'react-native-easy-breadcrumbs'

Use as a component

// initial crumb items, he we set one item, feel free to initialize it with more itens
const [crumbs, setCrumbs] = useState([
    { id: 0, title: 'Root' }
])

// initial selected crumbs, must be one crumb item
const [selectedCrumb, setSelectedCrumb] = useState<Crumb>({
    id: 0,
    title: 'Root',
})

// on crumb press event handler
const __onCrumbPress = (crumb: Crumb) => {
    console.log(crumb.id)
    // console.log('Selected', `Crumb ${crumb.title} selected`)
}

// your crumbs component call
<EasyBreadcrumb
    crumbs={crumbs}
    setCrumbs={setCrumbs}
    selectedCrumb={selectedCrumb}
    setSelectedCrumb={setSelectedCrumb}
    onCrumbPress={(crumb) => __onCrumbPress(crumb)}
/>

for concrete example, please check the example folder

API

Here is the customization properties you may use in order to customize your breadcrumb. There is brief description of prop, type, option, and description

| prop | type | description | | --------------------------- |:-------------:|:----------------------------------------------------------------------------| | flatlist | boolean | if to use flatlist to show crumbs. default to true | | horizontal | boolean | if to use flatlist horizontally | | crumbs | array | array of crumb items | | onCrumbPress | function | callback when crumb is pressed | | containerStyle | object | crumb container style | | selectedCrumbTextStyle | object | selected cumb text style | | selectedCrumbItemStyle | object | selected crumb container style | | selectedCrumbStyle | object | outside crumb container style (applied to the touchable opacity component) | | selectedCrumb | object | selected crumb | | setCrumbs | function | function to update crumbs or set crumbs | | setSelectedCrumb | function | function to set selected crumb | | unselectedCrumbStyle | object | style to be applied to all not selected crumbs container | | unselectedCrumbItemStyle | object | style to be applied to all not selected crumbs item container | | unselectedCrumbTextStyle | object | style to be applied to all not selected crumbs text | | contentContainerStyle | object | flatlist content style | | flatlistProps | object | style to override over flatlist |

Maintainers

@acgtwentyone

Contributing

See the contributing file!

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2021 Antonio Goncalves