-
How to use gradients on |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@elpuas - not sure what you mean. If you want to have it in the theme by default for a component of yours, you can use the same code in the theme object as well. |
Beta Was this translation helpful? Give feedback.
-
If you're looking to use a gradient on a component, you can use a functional value inside sx={{
backgroundImage: theme => `linear-gradient(to bottom, ${theme.colors.red}, ${theme.colors.orange})`
}} Does that answer your question? |
Beta Was this translation helpful? Give feedback.
-
Yeah, you're both right, on the example, there was a missing ',' so I was confused, but it is all cool now great product. |
Beta Was this translation helpful? Give feedback.
If you're looking to use a gradient on a component, you can use a functional value inside
sx
, like this:Does that answer your question?