|
1 |
| -# smart-list-box |
2 |
| -Grid Custom Element |
| 1 | +[](https://www.webcomponents.org/element/htmlelements/smart-listbox) |
| 2 | + |
| 3 | +# <smart-listbox> |
| 4 | + |
| 5 | +[Live Demo ↗](https://htmlelements.com/demos/l/) |
| 6 | +| |
| 7 | +[Documentation ↗](https://www.htmlelements.com/docs/) |
| 8 | +| |
| 9 | +[Installation ↗](https://www.npmjs.com/package/@smarthtmlelements/smarthtmlelements-core) |
| 10 | + |
| 11 | +[<smart-listbox>](https://htmlelements.com/demos/listbox/) is a listbox Custom HTML Element that make it easy to select and switch between different list items, part of the [Smart HTML Elements](https://htmlelements.com/). |
| 12 | + |
| 13 | +<!-- |
| 14 | +``` |
| 15 | +<custom-element-demo> |
| 16 | + <template> |
| 17 | + <script src="../webcomponentsjs/webcomponents-lite.js"></script> |
| 18 | + <script src="../smart-core/source/smart.element.js"></script> |
| 19 | + <script src="../smart-core/source/smart.button.js"></script> |
| 20 | + <script src="../smart-core/source/smart.scrollbar.js"></script> |
| 21 | + <script src="../smart-core/source/smart.listbox.js"></script> |
| 22 | + <link rel="stylesheet" href="../smart-core/source/styles/smart.base.css" type="text/css" /> |
| 23 | + <link rel="stylesheet" href="../smart-core/source/styles/smart.material.css" type="text/css" /> |
| 24 | + <next-code-block></next-code-block> |
| 25 | + </template> |
| 26 | +</custom-element-demo> |
| 27 | +``` |
| 28 | +--> |
| 29 | +```html |
| 30 | + <smart-list-box class='material'> |
| 31 | + <smart-list-item selected value="1">Item 1</smart-list-item> |
| 32 | + <smart-list-item value="2">Item 2</smart-list-item> |
| 33 | + <smart-list-item value="3">Item 3</smart-list-item> |
| 34 | + </smart-list-box> |
| 35 | +``` |
| 36 | + |
| 37 | +[<img src="https://raw.githubusercontent.com/htmlelements/smart-listbox/master/smart-listbox.png" alt="Screenshot of smart-listbox, using the Material theme">](https://htmlelements.com/demos/listbox) |
| 38 | + |
| 39 | +## Getting Started |
| 40 | + |
| 41 | +Smart HTML Elements components documentation includes getting started, customization and api documentation topics. |
| 42 | + |
| 43 | +[Getting Started Documentation](https://www.htmlelements.com/docs/listbox/) |
| 44 | +| |
| 45 | +[CSS Documentation](https://www.htmlelements.com/docs/listbox-css/) |
| 46 | +| |
| 47 | +[API Documentation](https://www.htmlelements.com/docs/listbox-api/) |
| 48 | + |
| 49 | + |
| 50 | +## The file structure for Smart HTML Elements |
| 51 | + |
| 52 | +- `source-minified/` |
| 53 | + |
| 54 | + Javascript files. |
| 55 | + |
| 56 | +- `source-minified/styles/` |
| 57 | + |
| 58 | + Component CSS Files. |
| 59 | + |
| 60 | +- `demos/` |
| 61 | + |
| 62 | + Demo files |
| 63 | + |
| 64 | +## Running demos in browser |
| 65 | + |
| 66 | +1. Fork the `Smart-HTML-Elements-Core` repository and clone it locally. |
| 67 | + |
| 68 | +1. Make sure you have [npm](https://www.npmjs.com/) installed. |
| 69 | + |
| 70 | +1. When in the `Smart-HTML-Elements-Core` directory, run `npm install` and then `bower install` to install dependencies. |
| 71 | + |
| 72 | +1. Run a localhost or upload the demo on a web server. Then run: |
| 73 | + |
| 74 | + - /demos/smart-button/smart-button-overview.htm |
| 75 | + |
| 76 | + |
| 77 | +## Following the coding style |
| 78 | + |
| 79 | +We are using [ESLint](http://eslint.org/) for linting JavaScript code. |
| 80 | + |
| 81 | +## Creating a pull request |
| 82 | + |
| 83 | + - Make sure your code is compliant with ESLint |
| 84 | + - [Submit a pull request](https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github) with detailed title and description |
| 85 | + - Wait for response from one of our team members |
| 86 | + |
| 87 | + |
| 88 | +## License |
| 89 | + |
| 90 | +Apache License 2.0 |
0 commit comments