Skip to content

Latest commit

 

History

History
84 lines (57 loc) · 2.14 KB

File metadata and controls

84 lines (57 loc) · 2.14 KB

npm npm GitHub forks GitHub stars

Installation

If using @nativescript :

  • tns plugin add nativescript-material-ripple

If using tns-core-modules

Be sure to run a new build after adding plugins to avoid any issues.


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.