Please provide the following:
- SDK Version: 3.28.2
- Platforms(Android/iOS/web/all): Android/iOS
- Add the appropriate “Tag” based on what Expo library you have a question on.
After checking the readme a couple of times, I’m only seeing colors/start/end/locations
as the params for the LinearGradient component. Per the docs;
start
with a value of { x: 0.1, y: 0.2 }
means that the gradient will start 10%
from the left and 20%
from the top, and
end
with a value of { x: 0.1, y: 0.2 }
means that the gradient will end 10%
from the left and 20%
from the bottom.
With the added note,
On web , this only changes the angle of the gradient because CSS gradients don’t support changing the end position.
So quickly, are angles only supported on web? Also, the distinction of the start-y value being from the top vs the end-y value being from the bottom seemed key, but tinkering with that hasn’t yielded any results for me either.
I would figure a start: {[0, 1]} end: {[1,0]}
or similar (like one user claimed worked here) would achieve some sort of spread left-to-right, top-to-bottom effect, but I know that in general there are some limitations within react native preventing gradients via css.
There’s some obvious workarounds like background images, potential other libraries, etc., but am I perhaps trying to do something not supported?
Cheers,