Giter Site home page Giter Site logo

react-textselect's Introduction

React Text Select

UNMAINTAINED

Unmantained for now.

--

Simple component to put an invisible Select dropdown over a text.

Live demo

react-textselect screenshot

Installation

npm install react-textselect --save

Usage.

var TextSelect = require('react-textselect');

<TextSelect
  options={['text select', 'react component', 'dropdown']}
  active={this.state.selectedOption}
  onChange={this.onTextSelectChange} />

Add styles.

Dont forget to add styles.

<link rel="stylesheet" href="/node_modules/react-textselect/dist/textselect.css">

Build

If you want to build this from source, you will need babel and less.

npm install -g babel less

And run the pre publish script

npm run prepublish

react-textselect's People

Contributors

javierbyte avatar sahandissanayake avatar twheys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-textselect's Issues

Active selection should be by name, not numerical index

Hi there,

I noticed with this plugin, you need to specify:

options={['option0', 'option1', 'option2']}
active={this.state.selectedOption}

Here, you actually need to specify the numerical INDEX of the selection you want, which means I need to do some funky logic to get the indices at runtime. It would be much nicer if I could specify instead "option1" instead of "1" as the active entry here instead.

position should be relative, not absolute

The absolute positioning limits the usability of this component. Would also benefit from componentizing the CSS, so that it can be pulled in as a dependency, rather than being a hard reference in the top level HTML template.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.