Dlucidone
Dlucidone

Reputation: 1101

How to set gradient background color in react-native Navbar?

How to achieve this sorta color on nav bar with react-native-router-flux. Thanks

enter image description here

Upvotes: 2

Views: 5027

Answers (2)

Waqas Ahmed
Waqas Ahmed

Reputation: 1411

You can check a custom navbar example in the link https://github.com/infinitered/ignite-ir-boilerplate-2016/blob/master/boilerplate/App/Navigation/CustomNavBar.js

Use react-native-linear-gradient to create gradient in a component and use it as a custom navbar see following line

<Scene key='sceneKey' component={Component} title='Component' navBar={CustomNavBar} />

Upvotes: 1

Mohamed Khalil
Mohamed Khalil

Reputation: 3126

with an image or react-native-linear-gradient create a greadient and place it under navbar and make the navber transparent or you can create your custom navBar component using something similar to react-native-router-flux-nav-bar

Upvotes: 0

Related Questions