Skip to content

Gradients #1011

Answered by lachlanjc
elpuas asked this question in General
Jun 17, 2020 · 3 comments
Discussion options

You must be logged in to vote

If you're looking to use a gradient on a component, you can use a functional value inside sx, like this:

sx={{
  backgroundImage: theme => `linear-gradient(to bottom, ${theme.colors.red}, ${theme.colors.orange})`
}}

Does that answer your question?

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by elpuas
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants