Socket
Socket
Sign inDemoInstall

expo-radio-button

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    expo-radio-button

[![Build Status](https://travis-ci.org/joemccann/dillinger.svg?branch=master)](https://travis-ci.org/joemccann/dillinger)


Version published
Maintainers
1
Install size
6.44 kB
Created

Readme

Source

expo-radio-button

Build Status

expo-radio-button is a beautiful and flexible radio button component

DEMO

Installation

npm i expo-radio-button --save
yarn add expo-radio-button

Example

import React, { useState } from "react";
import { Text, View } from "react-native";
import RadioButtonGroup, { RadioButtonItem } from "expo-radio-button";
export default function App() {
  const [current, setCurrent] = useState("test");

  return (
    <View style={{ marginTop: 50 }}>
      <RadioButtonGroup
        containerStyle={{ marginBottom: 10 }}
        selected={current}
        onSelected={(value) => setCurrent(value)}
        radioBackground="green"
      >
        <RadioButtonItem value="test2" label="Example with string" />
        <RadioButtonItem
          value="test"
          label={
            <Text style={{ color: "red" }}>Example passing React Element</Text>
          }
        />
      </RadioButtonGroup>
    </View>
  );
}

Properties RadioButtonGroup

PropertyDescription
selectedCurrent value selected
size(integer) Radio button size
containerStyleContainer Style
radioStyleRadio Button Style
radioBackgrounddefault blue

Events RadioButtonGroup

PropertyDescription
onSelectedmethod called when pressed

Properties RadioButtonItem

PropertyDescription
valueoption value
label(string or JSX.element)
styleView Style

License

MIT

Free Software, Hell Yeah!

Keywords

FAQs

Last updated on 24 Sep 2021

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc