Nikhil Shisode
Nikhil Shisode

Reputation: 177

how to removing Top shadow of material-top-tabs?

Current Behavior

enter image description here

Expected Behavior

How to reproduce

<>
<Header /> //App name custom component
<Tabs.Navigator
        ...
        tabBarOptions={{
          ....
          style: {
            // elevation: 0, 
          },
        }}>

Upvotes: 3

Views: 4287

Answers (1)

Try with this:

<>
<Header /> //App name custom component
<Tabs.Navigator
        ...
        tabBarOptions={{
          ....
          style: {
            elevation: 0,
            shadowColor: "#000000",
            shadowOffset: { width: 0, height: 10 }, // change this for more shadow
            shadowOpacity: 0.4,
            shadowRadius: 6
          },
        }}>

shadowOffset: { width: 0, height: 10 } shadows place only in bottom of View. shadowOffset: { width: 0, height: -10 } shadows place only in top of View. shadowOffset: { width: 10, height: 0 } shadows place only in right of View. shadowOffset: { width: -10, height: 10 } shadows place only in left of View.

Found this example here.

Upvotes: 4

Related Questions