Skip to content

Commit e4e571e

Browse files
authored
Update README.md
1 parent 0cb39bf commit e4e571e

File tree

1 file changed

+55
-1
lines changed

1 file changed

+55
-1
lines changed

README.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,56 @@
11
# react-native-breadcrumb
2-
A react-native breadcrumb for both android and ios.
2+
A react-native breadcrumb for both android and ios. You can define any number of crumbs and this will automatically adjust according to the wrapped view's width. If you need you can change the selected crumb by tapping on a crumb(should be activated by passing 'true' to isTouchable prop).
3+
4+
# Demo
5+
6+
![Alt text](/screenshots/1.gif?raw=true "IronDome")
7+
8+
# Installation
9+
```
10+
yarn add react-native-breadcrumb
11+
```
12+
or
13+
```
14+
npm install --save react-native-breadcrumb
15+
16+
```
17+
18+
# Usage
19+
```js
20+
import Breadcrumb from 'react-native-breadcrumb';
21+
22+
<Breadcrumb
23+
entities={['My Tab 1', 'My Tab 2', 'My Tab 3']}
24+
isTouchable={true}
25+
flowDepth={0}
26+
height={30}
27+
onCrumbPress={index => {}}
28+
borderRadius={5}
29+
/>
30+
```
31+
# Prop-types
32+
33+
| Prop name |Type |
34+
| ------------- | ------------- |
35+
| entities | list - list of names for crumbs |
36+
| flowDepth | int - indicates selected crumb indexing from 0 |
37+
| isTouchable | boolean - identify if crumbs are touchable |
38+
| onCrumbPress | function - this returns the selected crumbs index and is required if isTouchable is 'true' |
39+
| borderRadius | int - radius of the container |
40+
| crumbsContainerStyle | object - styles for view |
41+
| crumbStyle | object - styles for view |
42+
| activeCrumbStyle | object - styles for view |
43+
| crumbTextStyle | object - styles for Text |
44+
| activeCrumbTextStyle | object - styles for view |
45+
| height | int - indicates the height in pixels |
46+
47+
# Example
48+
49+
checkout sample directory and findout a react-native app.
50+
```
51+
react-native run-android
52+
```
53+
or
54+
```
55+
react-native run-ios
56+
```

0 commit comments

Comments
 (0)