# uxcore-radiogroup

> uxcore-radiogroup ui component for react

Latest version **1.3.3** (published 2018-09-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install uxcore-radiogroup
pnpm add uxcore-radiogroup
yarn add uxcore-radiogroup
bun add uxcore-radiogroup
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.3 |
| Published | 2018-09-27 |
| First published | 2015-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 25.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | eternalsky, kewenlei, majorye, qingniao99, surfacew |
| Keywords | react, react-component, react-uxcore-radiogroup, uxcore-radiogroup |

## Links

- npm: https://www.npmjs.com/package/uxcore-radiogroup
- Repository: https://github.com/uxcore/uxcore-radiogroup
- Homepage: https://github.com/uxcore/uxcore-radiogroup#readme
- Issues: http://github.com/uxcore/uxcore-radiogroup/issues
- npm.io page: https://npm.io/package/uxcore-radiogroup

## Dependencies (3)

- [classnames](https://npm.io/package/classnames.md) ^2.1.2
- [prop-types](https://npm.io/package/prop-types.md) 15.x
- [object-assign](https://npm.io/package/object-assign.md) ^4.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.3.3 (latest) — 2018-09-27
- 1.3.2 — 2018-09-26
- 1.3.1 — 2018-03-30
- 1.3.0 — 2018-03-13
- 1.2.4 — 2017-10-13
- 1.2.3 — 2017-09-26
- 1.2.2 — 2017-02-25
- 1.2.1 — 2016-11-21
- 1.2.0 — 2016-05-20
- 1.1.4 — 2016-04-27
- 1.1.3 — 2016-04-06
- 1.1.2 — 2016-03-06
- 1.1.1 — 2015-10-15
- 1.1.0 — 2015-09-22
- 1.0.1 — 2015-08-08
- … 1 more at https://npm.io/package/uxcore-radiogroup/versions

## README

---

## uxcore-radiogroup [![Dependency Status](http://img.shields.io/david/uxcore/uxcore-radiogroup.svg?style=flat-square)](https://david-dm.org/uxcore/uxcore-radiogroup) [![devDependency Status](http://img.shields.io/david/dev/uxcore/uxcore-radiogroup.svg?style=flat-square)](https://david-dm.org/uxcore/uxcore-radiogroup#info=devDependencies) 

## TL;DR

uxcore-radiogroup ui component for react

#### setup develop environment

```sh
$ git clone https://github.com/uxcore/uxcore-radiogroup
$ cd uxcore-radiogroup
$ npm install
$ gulp server
```

## Usage

```javascript
let RadioGroup = require('../src');
let {Item} = RadioGroup;

class Demo extends React.Component {
    constructor(props) {
        super(props);
        this.state = {};
    }

    handleChange(value) {
        let me = this;
        console.log(value);
        me.setState({
            value: value
        });
    }

    render() {
        let me = this;
        return (
            <RadioGroup value={me.state.value} onChange={me.handleChange.bind(me)}>
                <Item value="apple" text="苹果"/>  
                <Item value="banana" text=" 香蕉"/>  
                <Item value="orange" text="橘子"/>  
            </RadioGroup> 
        )
    }
}

module.exports = Demo;
```

## Demo
http://uxcore.github.io/uxcore/


## props

### Radiogroup

| 配置项 | 类型 | 必填 | 默认值 | 功能/备注 |
|---|---|---|---|---|
|value|string|required|""|radioGroup 被选中的项|
|onChange|function|required|noop|点击 radio 时触发，传入参数 value，代表被选中的项|
|disabled|boolean|optional|false|是否为 disable 状态|


### Radiogroup.Item

| 配置项 | 类型 | 必填 | 默认值 | 功能/备注 |
|---|---|---|---|---|
|value|string|required|""|该 radio 所代表的值|
|text|string|optional|""|该 radio 显示的说明|
|disabled|boolean|optional|-|Item 是否为 disable 状态，具有比 Group 更高的优先级|

---
_Source: https://npm.io/package/uxcore-radiogroup · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
