LinearGradient component
See original GitHub issueI recently came across this beautiful landing page from auth0: https://auth0.design/
It included these cool gradients:
Which reminded me of this webflow theme I used for the doorman.cool website:
It would be cool to have a LinearGradient component in Dripsy, which re-exports Expo’s.
import { LinearGradient } from '@dripsy/gradient'
// theme colors
<LinearGradient colors={['primary', 'accent']} />
Maybe you could even have gradients in your theme.
const theme = {
linearGradients: {
strong: ['primary', 'secondary']
}
}
<LinearGradient variant="strong" />
The variant prop might not be the right one to use here, since we’re technically not applying a set of styles, but rather we’re using an opinionated mapping of colors -> props.
This might be more appropriate:
const theme = {
linearGradients: {
strong: ['primary', 'secondary']
}
}
<LinearGradient gradient="strong" />
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (10 by maintainers)
Top Results From Across the Web
<linearGradient> - SVG: Scalable Vector Graphics | MDN
The <linearGradient> element lets authors define linear gradients to apply to other SVG elements. Example.
Read more >LinearGradient - Expo Documentation
LinearGradient. Type: Component<LinearGradientProps>. Renders a native view that transitions between multiple colors in a linear direction.
Read more >React Native Linear Gradient - GitHub
A component for react-native. Contribute to react-native-linear-gradient/react-native-linear-gradient development by creating an account on GitHub.
Read more >Creating complex gradients with react-native-linear-gradient
The LinearGradient component takes in a few props that determine how the gradient will be displayed, including colors, where it starts, ...
Read more >SVG Linear Gradient - W3Schools
SVG Gradients. A gradient is a smooth transition from one color to another. In addition, several color transitions can be applied to the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

One last thing, which is unrelated but I’m seeing on the Pressable code. Our current types for the
refprop increateThemedComponentare wrong. I’m forced to passas anywhenever I pass arefdown.Alright, I’ll try to make your code the basis for the pressable component and check out that other issue. We can always tweak as we go.