Socket
Socket
Sign inDemoInstall

react-custom-radio-buttons-group

Package Overview
Dependencies
6
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-custom-radio-buttons-group

Simple Radio-buttons group Component


Version published
Weekly downloads
5
Maintainers
1
Created
Weekly downloads
 

Readme

Source

react-custom-radio-buttons-group is a well designed single react component that helps you create radio-buttons group.

react-custom-radio-buttons-group

Installing / Getting started

This package is available in NPM repository as react-custom-radio-buttons-group. It will work correctly with all popular bundlers.

npm install react-custom-radio-buttons-group --save

Using yarn

yarn add react-custom-radio-buttons-group

Include the Component

To start using react-custom-radio-buttons-group you just need to import the component RadioButtonGroup from the package.

import React from 'react';
import RadioButtonGroup from 'react-custom-radio-buttons-group';
const handleChange = (e)=>{
    doSomething(e.target.value)
}
export default () => (
  <RadioButtonGroup
    onChange={handleChange}
    hide={false}
    values={[...]}
    />
);

Documentation

RadioButtonGroup

namedescription
onChangecalled when select a value from values
valuesArray of radio-buttons
hideif true it hides radio button input

Values

  • Values can be an array of text:
  <RadioButtonGroup
    onChange={handleChange}
    hide={false}
    values={["Apple","Banana","Orange"]}
    />
  • Or a react component
  <RadioButtonGroup
    onChange={handleChange}
    hide={true}
    values={[<Especes/>,<Paypal/>,<Credit/>,<Tpe/>]}
    />

custom

Custom styles

To edit radio-buttons default change you have to override the css properties of classes bellow:

/* radio-button default style */
  .radio-button {
}
/* radio-button active style */
.radio-button.active {
}
/* radio-button input default style */
.dot{
}
.dot::before{
}
/* radio-button input active style */
.dot.active{
}
.dot.active::before{
}

Keywords

FAQs

Last updated on 25 Jul 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