Linear Gradient as Button background color #5184
Replies: 5 comments 1 reply
-
Lurking codebase, Pressable should be allowed to get Linear Gradient, not Button. |
Beta Was this translation helpful? Give feedback.
-
Hello @codakkk, we'll surely consider this API for |
Beta Was this translation helpful? Give feedback.
-
@mayank-96 let me know if you would be interested in a pull request and best approach
|
Beta Was this translation helpful? Give feedback.
-
@johnf Thanks for your suggestion. We'll make those changes in the coming release. |
Beta Was this translation helpful? Give feedback.
-
@surajahmed Has this been implemented? How I can add a linear gradient to my buttons? Thanks |
Beta Was this translation helpful? Give feedback.
-
Description
There's no way to pass Linear Gradient props.
Problem Statement
It's possible to pass Linear Gradient to every component except for Button.
Proposed Solution or API
<Button bg={{linearGradient={....}}} />
Alternatives
Trryied with parent Box:
<Box bgColor={{ linearGradient: { colors: ['#E31E24', '#B62322', '#962B24'], start: [0, 0], end: [1, 0], }, }}> <Button variant="unstyled">Applica Filtri</Button> </Box>
but with bad results (losing all the props on child, like rounded, etc)
I tryied to pass the bg to _stack with bad results.
Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions