Skip to main content

ipyvuetify

Documentation Version Version Conda Version Binder Black badge conventional commit

Jupyter widgets based on vuetify UI components which implement Google's Material Design Spec with the Vue.js framework.

A small selection of widgets:

ipyvuetify

Installation

To install use pip:

$ pip install ipyvuetify

# for Jupyter Lab < 3
$ jupyter labextension install jupyter-vuetify

For a development installation (requires npm),

$ git clone https://github.com/mariobuikhuizen/ipyvuetify.git
$ cd ipyvuetify
$ pip install -e ".[dev]"
$ pre-commit install
$ jupyter nbextension install --py --symlink --sys-prefix ipyvuetify
$ jupyter nbextension enable --py --sys-prefix ipyvuetify

Documentation

To get started with using ipyvuetify, check out the full documentation

https://ipyvuetify.readthedocs.io/

Usage

For examples see the example notebook.

The Vuetify 3 documentation can be used to find all available components and attributes (in the left side bar or use the search field). Ipyvuetify tries to stay close to the Vue.js and Vuetify template syntax, but there are some differences:

Description Vuetify ipyvuetify
Component names are in CamelCase and the v- prefix is stripped <v-list-item .../> ListItem(...)
Child components and text are defined in the children traitlet <v-btn>text <v-icon .../></v-btn> Btn(children=['text', Icon(...)])
Flag attributes require a boolean value <v-btn rounded ...> Btn(rounded=True, ...)
Attributes are snake_case <v-select append-icon="mdi-menu" ...> Select(append_icon='mdi-menu', ...)
The v_model attribute (value in ipywidgets) contains the value directly <v-slider v-model="some_property" ... Slider(v_model=25...
Event listeners are defined with on_event <v-btn @click='someMethod()' ... button.on_event('click', some_method)
def some_method(widget, event, data):
Regular HTML tags can made with the Html class <div>...</div> Html(tag='div', children=[...])
The attributes class and style need to be suffixed with an underscore <v-btn class="mr-3" style="..." > Btn(class_='mr-3', style_='...')

Advanced usage

v-model arguments

Vue 3 uses v-model arguments for two-way bindings on component properties. The same behavior can be achieved in ipyvuetify by listening for an event named update:[propertyNameInCamelCase].

Vuetify:
<v-navigation-drawer v-model:rail="someProperty" ...>
ipyvuetify:
drawer = v.NavigationDrawer(rail=True, ...)

def update_rail(widget, event, data):
    drawer.rail = data

drawer.on_event('update:rail', update_rail)

(scoped) slots

Vuetify:
<v-menu>
  <template v-slot:activator="{ props }">
    <v-btn v-bind="props">...</v-btn>
  </template>
  <v-list>
    ...
  </v-list>
</v-menu>
ipyvuetify:
Menu(v_slots=[{
    'name': 'activator',
    'variable': 'x',
    'children': Btn(v_on='x.props', children=[...])
}], children=[
    List(...)
])

For non-scoped slots, variable and v_on can be omitted.

Icons

Available icons:

Alternate usage

For a more web development centric way of development and a closer match to the Vue/Vuetify api, VuetifyTemplate can be used. See the example or Binder.

Make a sub class of VuetifyTemplate, define your own traitlets and set a template string. The traitlets will be accessible from the template as if they were in a vue-model. Methods can be called by defining a method with a prefix vue_ e.g. def vue_button_click(self, data) and calling it from the template e.g. @click="button_click(e)".

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipyvuetify-3.0.0.tar.gz (8.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipyvuetify-3.0.0-py2.py3-none-any.whl (8.8 MB view details)

Uploaded Python 2Python 3

File details

Details for the file ipyvuetify-3.0.0.tar.gz.

File metadata

  • Download URL: ipyvuetify-3.0.0.tar.gz
  • Upload date:
  • Size: 8.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for ipyvuetify-3.0.0.tar.gz
Algorithm Hash digest
SHA256 265402700632d2c31257824cd266211cdbae755b80343a145881f97acdcb53ab
MD5 0c4f7980d261aff25bdf22aae2259a25
BLAKE2b-256 a14f80150db47624c79dc8cfe00e6c00c92333a861b59b9dff10f5f148e25042

See more details on using hashes here.

File details

Details for the file ipyvuetify-3.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: ipyvuetify-3.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.8 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for ipyvuetify-3.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 11a615ff49e0176fd4662e0a947ed015938b85b32b3185cebd6f9af06aa5f441
MD5 7e663706262eb3fbe8fde6a57a763309
BLAKE2b-256 b2d3c38039c3cbaa1d126a43a5e985c52f4f1841437a88303b324b1b3c3ede5f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 files

1.11.3

2 files

1.11.2

2 files

1.11.1

2 files

1.11.0

2 files

1.10.0

2 files

1.9.4

2 files

1.9.3

2 files

1.9.2

2 files

1.9.1

2 files

1.9.0

2 files

1.8.10

2 files

1.8.9

2 files

1.8.8

2 files

1.8.7

2 files

1.8.6

2 files

1.8.5

2 files

1.8.4

2 files

1.8.3

2 files

1.8.2

3 files

1.8.1

2 files

1.8.0

2 files

1.7.0

2 files

1.6.2

2 files

1.6.1

2 files

1.6.0

1 file

1.5.1

2 files

1.5.0

2 files

1.4.1

2 files

1.4.0

1 file

1.3.0

1 file

1.2.2

1 file

1.2.1

1 file

1.2.0

1 file

1.1.1

1 file

1.1.0

1 file

1.0.4

1 file

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

1.0.0

1 file

0.1.11

1 file

0.1.10

1 file

0.1.9

1 file

0.1.8

1 file

0.1.7

1 file

0.1.6

1 file

0.1.5

1 file

0.1.4

1 file

0.1.3

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page