Nattily Polished Marbles

react-composable-dropdown

1.0.4 • Public • Published

React Composable Dropdown

Fancier than your average <input> dropdown.

Features

  • Specify your own interior <li> item view.
  • Dropdown button and list items can be styled with CSS, unlike the standard HTML dropdown.

Installation

npm install --save react-composable-dropdown

Using It

  var React = require('react');
  var Dropdown = require('./../src/index');

  var items = [
    {
      text: 'Apple Pie',
      value: 'apple'
    },
    {
      text: 'Blueberry Pie',
      value: 'blueberry'
    },
    {
      text: 'Peach Cobbler',
      value: 'peach'
    }
  ];

  React.render(
    React.createElement(Dropdown, {items: items, 		defaultText: 'Pie Options'}),
    document.querySelector('.container')
  );

Example

See README in /example/

License

MIT

Keywords

none

install

npm i react-composable-dropdown

Downloadsweekly downloads

7

version

1.0.4

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability