3.3.2 • Published 3 years ago

nativescript-material-button v3.3.2

Weekly downloads
115
License
Apache-2.0
Repository
-
Last release
3 years ago

npm npm GitHub forks GitHub stars

Installation

If using @nativescript :

  • tns plugin add nativescript-material-button

If using tns-core-modules

  • tns plugin add nativescript-material-button@2.5.4

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:mdb="nativescript-material-button" on the Page element

XML

<Page xmlns:mdb="nativescript-material-button">
    <StackLayout horizontalAlignment="center">
        <mdb:Button text="raised button"/>
        <mdb:Button variant="flat" text="flat button"/>
        <mdb:Button variant="text" text="text button"/>
        <mdb:Button elevation="5" rippleColor="red" text="raised custom button"/>
   </StackLayout>
</Page>

CSS

mdbutton {
    ripple-color: blue;
    elevation: 4;
}

NativeScript + Angular

import { NativeScriptMaterialButtonModule } from "nativescript-material-button/angular";

@NgModule({
    imports: [
        NativeScriptMaterialButtonModule,
        ...
    ],
    ...
})
<MDButton rippleColor="blue" text="text button"></MDButton>

NativeScript + Vue

import Vue from 'nativescript-vue';
import ButtonPlugin from 'nativescript-material-button/vue';

Vue.use(ButtonPlugin);
<MDButton rippleColor="blue" text="text button"/>

Attributes

Inherite from Nativescript Button so it already has all the same attributes

Attributes

  • elevation optional

An attribute to set the elevation of the button. This will increase the 'drop-shadow' of the button.

  • variant optional

An attribute to set the variant of the button. Can be flat or . No value means raised button

  • rippleColor optional

An attribute to set the ripple color of the button.

3.3.2

3 years ago

3.3.1

4 years ago

3.3.0

4 years ago

3.2.21

4 years ago

3.2.19

4 years ago

3.2.18

4 years ago

3.2.10

4 years ago

3.2.9

4 years ago

3.2.8

4 years ago

3.2.6

4 years ago

3.2.5

4 years ago

3.2.4

4 years ago

3.2.3

4 years ago

3.2.2

4 years ago

3.2.1

4 years ago

3.1.17

4 years ago

3.1.16

4 years ago

3.1.15

4 years ago

3.1.14

4 years ago

3.1.13

4 years ago

3.1.12

4 years ago

3.1.11

4 years ago

3.1.10

4 years ago

3.1.9

4 years ago

3.1.8

4 years ago

3.1.7

4 years ago

3.1.6

4 years ago

3.1.5

4 years ago

3.1.4

4 years ago

3.1.3

4 years ago

3.1.2

4 years ago

3.1.1

4 years ago

3.0.9

4 years ago

3.0.6

4 years ago

3.0.5

4 years ago

3.0.3

4 years ago

3.0.2

4 years ago

3.0.0

4 years ago

2.5.4

5 years ago

2.5.3

5 years ago

2.5.2

5 years ago

2.5.1

5 years ago

2.5.0

5 years ago

2.4.2

5 years ago

2.4.1

5 years ago

2.3.24

5 years ago

2.3.23

5 years ago

2.3.22

5 years ago

2.3.21

5 years ago

2.3.20

5 years ago

2.3.19

5 years ago

2.3.18

5 years ago

2.3.17

5 years ago

2.3.16

5 years ago

2.3.15

5 years ago

2.3.14

5 years ago

2.3.13

5 years ago

2.3.12

5 years ago

2.3.11

5 years ago

2.3.10

5 years ago

2.3.9

5 years ago

2.3.8

5 years ago

2.3.6

5 years ago

2.3.4

5 years ago

2.3.3

5 years ago

2.3.2

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.17

5 years ago

2.2.16

5 years ago

2.2.15

5 years ago

2.2.14

5 years ago

2.2.13

5 years ago

2.2.12

5 years ago

2.2.11

5 years ago

2.2.10

5 years ago

2.2.9

5 years ago

2.2.8

5 years ago

2.2.7

5 years ago

2.2.6

5 years ago

2.2.5

5 years ago

2.2.4

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.2.0-alpha.1

5 years ago

2.2.0-alpha.0

5 years ago

2.1.8

5 years ago

2.1.7

5 years ago

2.1.6

5 years ago

2.1.5

5 years ago

2.1.4

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago