diff --git a/README.md b/README.md index cd44ff0..7e5e738 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,81 @@ An accessible select box component for React. $ npm install react-select-box --save ``` +## Usage +To add a single select box: + +```JavaScript +import React from 'react'; +import SelectBox from 'react-select-box'; + +var option = React.createElement.bind(null, 'option'); + +export default class Example extends React.Component { + + constructor() { + super(); + this.state = { + color: null + }; + } + + handleChange(color) { + this.setState({color}); + } + + render() { + return ( +