Trame-vuetify extends Trame's widgets and UI with Vuetify's Material Design components. Vuetify is a UI Library with beautifully handcrafted Material Components, enabling users to create rich web applications without extensive design skills. It is not meant to be used standalone but as a dependency of `trame`. The current version is 3.2.1, and it follows the release cadence of `trame` and `Vuetify` updates.
pip install trame-vuetifyVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates a basic Trame application using `trame-vuetify` components like `VSlider`, `VTextField`, and `VBtn` within a `SinglePageLayout`. It shows how to bind Python state variables (`slider_value`, `name`) to Vuetify components and handle events. Explicitly setting `client_type="vue3"` is recommended for `trame` v3.
For new projects, set `server.client_type = "vue3"` and ensure `trame-vuetify` is installed. For migrating existing `trame` v2 projects, explicitly set `server.client_type = "vue2"` and install `trame-vuetify`. Be aware of potential Vuetify API changes between v2 and v3.
Always convert kebab-case component names from Vuetify documentation to CamelCase when using `trame.widgets.vuetify`. For example, `<v-btn>` becomes `vuetify.VBtn()`.
Ensure all boolean attributes are explicitly assigned `True` or `False`.
Replace dashes and colons with underscores for attribute names in Python.
Use `attribute_name=python_function` for server-side handlers or `attribute_name="javascript_expression"` for client-side logic.
pip install trame-vuetify
from trame.widgets import vuetify
Correct the component name and casing, for example, `vuetify.VBtn`.
from trame.app import get_server server = get_server()