Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NativeScript-Vue button with linear gradient background and image

In NativeScript with vue.js, I'm trying to figure out if it is possible to have a button which has a linear gradient background and shows an image above the button text. When I set up the CSS to do that, it doesn't seem to work.

I set up a playground to demonstrate: https://play.nativescript.org/?template=play-vue&id=kICEBa&v=1.

Am I doing something wrong, or is this simply not supported by NativeScript-Vue?

If it's not supported by CSS, is there some other way to achieve this result?

like image 643
ppritcha Avatar asked Aug 28 '26 19:08

ppritcha


1 Answers

I don't think having both on same element is yet supported. You may raise a feature request to support both.

Meanwhile wrap your button with a layout / content view and apply the gradient on it.

like image 129
Manoj Avatar answered Aug 31 '26 16:08

Manoj



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!