🚀. Socket Launch Week Day 2:Introducing Manifest Alerts.Learn more
Sign In

@webileapps/nativescript-radiobutton

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webileapps/nativescript-radiobutton

A plugin for nativescript that exposes the radiogroup and radiobutton native view elements.

Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
25
108.33%
Maintainers
2
Weekly downloads
 
Created
Source

NativeScript-RadioButton

npm npm

A NativeScript plugin for the native radiogroup and radiobutton widget.

Platform controls used:

AndroidiOS
Android RadioGroupNONE
Android RadioButtonNONE

Installation

From your command prompt/terminal go to your app's root folder and execute:

tns plugin add nativescript-radiobutton

Usage

Demo App

If you want a quickstart, clone the repo, cd src, and execute the following commands:

npm install
npm run demo.android

Angular

Import to NgModule for use

import { RadioButtonModule } from 'nativescript-radiobutton/angular'

@NgModule({
    imports: [
        RadioButtonModule
    ]
})

Place this in your view.

<StackLayout>
    <RadioGroup [(value)]="dataBoundVariable">
        <RadioButton text="Selection 1"></RadioButton>
        <RadioButton text="Selection 2"></RadioButton>
        <RadioButton text="Selection 3"></RadioButton>
    </RadioGroup>
</StackLayout>

NativeScript-Vue

In your main.js register both RadioGroup and RadioButton elements

Vue.registerElement('RadioGroup', () => require('nativescript-radiobutton').RadioGroup)
Vue.registerElement('RadioButton', () => require('nativescript-radiobutton').RadioButton)

And in your template, use it

<RadioGroup
  @selected="onSelected">
  <RadioButton
    v-for="item in someList"
    :key="item.id"
    :text="item.text">
  </RadioButton>
</RadioGroup>

Supported Properties

###RadioButton

AndroidExample
enabledenabled="true | false"
texttext="a string"
checkedchecked="true | false"

###RadioGroup

AndroidReturns
valuethe index of the radio button selected

Supported Events

###RadioButton

AndroidExample
enabledenabled="true | false"
texttext="a string"
checkedchecked="true | false"

###RadioGroup

AndroidType
valueEventEmitter

Keywords

NativeScript

FAQs

Package last updated on 08 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts