Vue 2/3 template for Streamlit Components
MIT License
Vue 3 template to build a Streamlit component. Uses Vue.js scoped slot to send parameters from Streamlit Python script into args
props of your component.
Copy paste of the original component-template quickstart.
$ python3 -m venv venv # create venv
$ . venv/bin/activate # activate venv
$ pip install streamlit # install streamlit
$ cd my_component/frontend
$ npm install # Install npm dependencies
$ npm run serve # Start the Webpack dev server
$ . venv/bin/activate # activate the venv you created earlier
$ streamlit run my_component/__init__.py # run the example
my_component/frontend/src/MyComponent.vue
.
args
props.my_component/__init__.py
.my_component
folder, MyComponent.vue
file with its import in App.vue
, and package name in setup.py
and package.json
.