Vanilla HTML components for Dash
Archived. The repository is read-only: no more fixes or releases will come.
pip install dash-html-componentsNotice
As of Dash 2, the development of dash-html-components has been moved to the main Dash repo
This package exists for backward compatibility
dash-html-components
Vanilla HTML components for Dash
Install dependencies
-
Create a virtual env and activate.
$ virtualenv venv $ venv/bin/activateNote: venv\Scripts\activate for Windows
-
Install Python packages required to build components.
$ pip install -r dev-requirements.txt -
Generate components and install npm packages
$ npm install
Generating HTML Components
The components in src/components, as well as the export index in
src/index.js are programmatically generated from element definitions in
scripts/. To regenerate:
$ npm run generate-components
The list of attributes is regenerated by scraping the MDN HTML attribute reference.
Note: This step will have already been done for you when you ran npm install
Development
Testing your components in Dash
-
Watch for changes
$ npm run build:watch -
Install module locally (after every change)
# Generate metadata, and build the JavaScript bundle $ npm run install-local # Now you're done. For subsequent changes, if you've got `npm run build:watch` $ python setup.py install -
Run the Dash layout you want to test
# Import dash_html_components to your layout, then run it: $ python my_dash_layout.py
Installing Python package locally
Before publishing to PyPi, you can test installing the module locally:
# Install in `site-packages` on your machine
$ npm run install-local
Uninstalling Python package locally
$ npm run uninstall-local