7.2.54 • Published 7 days ago

@nativescript-community/ui-material-switch v7.2.54

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 days ago

NativeScript Material Switch

Material Design's Switch component for NativeScript.

npm npm

Contents

  1. Installation
  2. Changelog
  3. FAQ
  4. Usage
  5. API

Installation

For NativeScript 7.0+

  • tns plugin add @nativescript-community/ui-material-switch

For NativeScript 6.x

  • tns plugin add nativescript-material-switch

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

Changelog

FAQ

Usage

Plain NativeScript

IMPORTANT: Make sure you include xmlns:mdp="@nativescript-community/ui-material-progress" on the Page element

XML

<Page xmlns:mdp="@nativescript-community/ui-material-switch">
    <StackLayout horizontalAlignment="center">
        <mdp:Switch />
   </StackLayout>
</Page>

CSS

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

NativeScript + Angular

import { NativeScriptMaterialSwitchModule } from "@nativescript-community/ui-material-switch/angular";

@NgModule({
    imports: [
        NativeScriptMaterialSwitchModule,
        ...
    ],
    ...
})
<MDSwitch v-model="value"></MDSwitch>

NativeScript + Vue

import SwitchPlugin from '@nativescript-community/ui-material-switch/vue';

Vue.use(SwitchPlugin);
<MDSwitch></MDSwitch>

API

Attributes

Inherits from NativeScript Switch so it already has all the same attributes.

7.2.54

7 days ago

7.2.53

19 days ago

7.2.52

19 days ago

7.2.50

22 days ago

7.2.48

1 month ago

7.2.49

1 month ago

7.2.46

2 months ago

7.2.47

2 months ago

7.2.45

3 months ago

7.2.44

3 months ago

7.2.43

4 months ago

7.2.42

4 months ago

7.2.41

4 months ago

7.2.40

4 months ago

7.2.38

4 months ago

7.2.35

4 months ago

7.2.36

4 months ago

7.2.34

4 months ago

7.2.32

4 months ago

7.2.30

4 months ago

7.2.29

4 months ago

7.2.28

5 months ago

7.2.27

5 months ago

7.2.26

5 months ago

7.2.25

5 months ago

7.2.24

5 months ago

7.2.23

5 months ago

7.2.22

6 months ago

7.2.20

6 months ago

7.2.21

6 months ago

7.2.1

7 months ago

7.2.0

7 months ago

7.2.6

6 months ago

7.2.5

6 months ago

7.2.4

7 months ago

7.2.3

7 months ago

7.1.4

10 months ago

7.2.9

6 months ago

7.2.8

6 months ago

7.2.7

6 months ago

7.2.13

6 months ago

7.2.12

6 months ago

7.2.15

6 months ago

7.2.14

6 months ago

7.2.11

6 months ago

7.2.17

6 months ago

7.2.16

6 months ago

7.2.19

6 months ago

7.2.18

6 months ago

7.1.3

1 year ago

7.1.2

1 year ago

7.1.1

1 year ago

7.1.0

1 year ago