Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chenglou/react-placeholder-shim
Form placeholder for input and textarea in ie8 and 9.
https://github.com/chenglou/react-placeholder-shim
Last synced: about 1 month ago
JSON representation
Form placeholder for input and textarea in ie8 and 9.
- Host: GitHub
- URL: https://github.com/chenglou/react-placeholder-shim
- Owner: chenglou
- Created: 2013-08-15T17:22:05.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-07-30T23:32:04.000Z (over 10 years ago)
- Last Synced: 2024-10-09T15:06:58.164Z (about 1 month ago)
- Language: JavaScript
- Size: 305 KB
- Stars: 9
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [React](http://facebook.github.io/react/)-placeholder-shim
Form placeholder for input and textarea in ie8 and 9.
## install
Npm:
```sh
npm install react-placeholder-shim
```Bower:
```sh
bower install react-placeholder-shim
```Or simply drop the script somewhere on your page (after React of course):
```html
```
## API
The module exposes the `placeholderShim` object globally if it doesn't detect cjs (npm). Otherwise, it exports the object.
The object contains two components.
#### <Input />
For inputs type of `text` and `password`.#### <TextArea />
For `textarea`.## Usage
```html
/** @jsx React.DOM */
// Assuming the library's dropped in as a script tag.
var Input = placeholderShim.Input;// try this on IE!
var Demo = React.createClass({
render: function() {
return (
)
},handleChange: function(a, b, c) {
console.log('it all just works!');
}
});React.renderComponent(, document.body);
```## License
MIT.