npm i --save nativescript-material-ripple
- Version: 3.3.2
- GitHub:
- NPM: https://www.npmjs.com/package/nativescript-material-ripple
- Downloads:
- Last Day: 0
- Last Week: 0
- Last Month: 0
Installation
If using @nativescript
:
tns plugin add nativescript-material-ripple
If using tns-core-modules
tns plugin add [email protected]
Be sure to run a new build after adding plugins to avoid any issues.
Material Design Spec
Usage
Plain NativeScript
IMPORTANT: Make sure you include xmlns:mdr="nativescript-material-ripple"
on the Page element
XML
<Page xmlns:mdr="nativescript-material-ripple">
<StackLayout horizontalAlignment="center">
<mdr:Ripple rippleColor="green" width="100" height="100" />
</StackLayout>
</Page>
CSS
mdcripple {
ripple-color: blue;
}
NativeScript + Angular
import { NativeScriptMaterialRippleModule } from "nativescript-material-ripple/angular";
@NgModule({
imports: [
NativeScriptMaterialRippleModule,
...
],
...
})
<MDRipple rippleColor="green" width="100" height="100"></MDRipple>
NativeScript + Vue
import Vue from 'nativescript-vue';
import RipplePlugin from 'nativescript-material-ripple/vue';
Vue.use(RipplePlugin);
<MDRipple rippleColor="green" width="100" height="100"/>
Attributes
Inherite from Nativescript StackLayout
Attributes
- rippleColor optional
An attribute to set the ripple color of the ripple.