UNPKG

react-typeahead

Version:

React-based typeahead and typeahead-tokenizer

65 lines (63 loc) 1.59 kB
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <script src="http://fb.me/react-with-addons-0.12.2.min.js"></script> <script src="http://fb.me/JSXTransformer-0.12.2.js"></script> <script src="../dist/react-typeahead.js"></script> </head> <body> <style> .hover { border-style: dotted; border-width: 1px; background-color: LightGray; margin: -1px; } .typeahead-selector { margin: 0; padding: 4px 0px 4px 0px; position: absolute; border-style: solid; border-width: 1px 2px 2px 1px; background-color: white; } .typeahead-option { padding: 0px 4px 0px 4px; } .typeahead-token { border-style: solid; border-color: gray; border-width: 1px 2px 2px 1px; padding: 1px 5px 1px 5px; margin-right: 4px; display: inline; border-radius: 5px; } .typeahead, .typeahead input, #example, .typeahead-tokenizer { display: inline; } .typeahead-token-close { text-decoration: none; margin-left: 8px; } </style> <form> <div id="example"></div> <script type="text/jsx"> /** @jsx React.DOM */ React.render( <ReactTypeahead.Tokenizer defaultValue="foo" name="spamselect" options={ ["foobar", "spameggs", "hameggs", "spamfoo", "spam"]} />, document.getElementById("example") ); </script> <input type="submit"></input> </form> <hr /> This is a footer </body> </html>