1

How can i apply buttom inner shadow like this image in react native? Buttom inner shadow

Arsiki
  • 348
  • 2
  • 12

2 Answers2

0

I think you refer to a radial-gradient applied on the background of the element.

Button {
background: radial-gradient(rgba(0,0,0,0), black);
}

There are options to manipulate the same gradient with % porcentages in order to get a thiner effect or thicker effect

  • Hi Jose, it's a little bit complicated for me. my code is like this ``` ``` the problem is the Image cover my View so i cant cover the background gradient to it. how is it possible to give my View Cointainer this style? – Arsiki Jul 05 '21 at 23:41
0

Ok. I cant add comments so i am going with another idea. BUT this wont work if you have to click.

.container {
  position: relative;
 }

.container::after {
  Position:absolute;
  Inset:0;
  Content:'';
  Background: radial-gradient(rgba(0,0,0,0), black);
  z-index: 1;
}

This trick will make a cover box that can add a filter style. But if you have to click something, we need to go further than this.