@crave/farmblocks-input-radio

3.6.8 • Public • Published

logo-farmblocks

Farmblocks Radio

Radio form element. See Storybook

Installation

npm install @crave/farmblocks-input-radio

Usage

import React from "react";
import ReactDOM from "react-dom";
import Radio, { RadioGroup } from "@crave/farmblocks-map-balloon";

const root = document.createElement("div");

ReactDOM.render(
  <div>
    <RadioGroup name="radioExample" defaultValue="second">
      <Radio value="first" label="First" />
      <Radio value="second" label="Second (default)" />
      <Radio value="third" label="Third (disabled)" disabled />
    </RadioGroup>
  </div>,
  root,
);

document.body.appendChild(root);

API

Radio

  • label: node
  • name: string
  • checked: boolean
  • disabled: boolean
  • onClick: function
  • onChange: function
  • value: any

RadioGroup

  • defaultValue: any. If set, the radio option with this value will be automatically checked.
  • name: string. Will be given to all the children.
  • disabled: boolean. If set, all the children will be disabled.
  • onChange: function

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @crave/farmblocks-input-radio

Weekly Downloads

0

Version

3.6.8

License

MIT

Unpacked Size

10.4 kB

Total Files

9

Last publish

Collaborators

  • viniciusmartin
  • luis.nascimento
  • seocam
  • vnakamura
  • alcferreira
  • imwra