Skip to main content

Vue Router widgets for trame

Project description

Trame-router extend trame widgets and ui with Vue Router components and helper to streamline its usage with trame. Vue Router is the offical router for Vue.js on which trame is based.

Installing

trame-router can be installed with pip:

pip install --upgrade trame-router

Usage

The Trame Tutorial is the place to go to learn how to use the library and start building your own application.

The API Reference documentation provides API-level documentation.

The original Vue Router documentation provide a great introduction resource.

The router elements can be used as follow in trame:

# [...]
from trame.ui.router import RouterViewLayout
from trame.widgets import router

with RouterViewLayout(server, "/"):
    with vuetify.VCard():
        vuetify.VCardTitle("This is home")

with RouterViewLayout(server, "/foo"):
    with vuetify.VCard():
        vuetify.VCardTitle("This is foo")

with RouterViewLayout(server, "/bar/:id"):
    with vuetify.VList():
        vuetify.VListItem("Bar {{ $route.params.id }} item 1")
        vuetify.VListItem("Bar {{ $route.params.id }} item 2")
        vuetify.VListItem("Bar {{ $route.params.id }} item 3")

with SinglePageWithDrawerLayout(server) as layout:
    with layout.toolbar:
        vuetify.VBtn("Home", to="/")
        vuetify.VBtn("Foo", to="/foo")
        vuetify.VBtn("Bar 1", to="/bar/1")
        vuetify.VBtn("Bar 2", to="/bar/2")
        vuetify.VBtn("Bar 3", to="/bar/3")

    with layout.content:
        router.RouterView()

License

trame-router is made available under the MIT License. For more details, see LICENSE This license has been chosen to match the one use by Vue Router which is used under the cover.

Community

Trame | Discussions | Issues | RoadMap | Contact Us

https://zenodo.org/badge/410108340.svg

Enjoying trame?

Share your experience with a testimonial or with a brand approval.

Project details


Download files

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

Source Distribution

trame-router-2.0.0rc4.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

trame_router-2.0.0rc4-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file trame-router-2.0.0rc4.tar.gz.

File metadata

  • Download URL: trame-router-2.0.0rc4.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.5

File hashes

Hashes for trame-router-2.0.0rc4.tar.gz
Algorithm Hash digest
SHA256 0a1e120c98d1eee8c09fe9d8a8b4104b7229de9bffc971b4e5fa121a07e321b3
MD5 0bb2e54253bc1d215e1992f2c0bc64ff
BLAKE2b-256 1a5c63c5b91bcbb8de1dd6f16d31d7fab6d41fff410271ca64401e0f00d6568a

See more details on using hashes here.

File details

Details for the file trame_router-2.0.0rc4-py3-none-any.whl.

File metadata

File hashes

Hashes for trame_router-2.0.0rc4-py3-none-any.whl
Algorithm Hash digest
SHA256 9b4f2f27d1850a35a19b8aac1a4074691b59ce27a66a698fe0a6e5420862227e
MD5 b904ad0d804a7a9878cd18ab3c48b109
BLAKE2b-256 a2c05d2951a9c0604b087da85463e294d5c2e0035c22d608fb3aff5fed53c496

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page