File: 01_floatcard.py

package info (click to toggle)
python-trame 3.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 101,620 kB
  • sloc: python: 13,515; sh: 183; javascript: 93; makefile: 7
file content (22 lines) | stat: -rw-r--r-- 515 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
r"""
Installation requirements:
    pip install trame trame-vuetify trame-components
"""

from trame.app import get_server
from trame.ui.vuetify import SinglePageLayout
from trame.widgets import trame

server = get_server(client_type="vue2")

with SinglePageLayout(server) as layout:
    layout.title.set_text("FloatCard Demo")

    with layout.content:
        trame.FloatCard(
            "Drag the handle to move me anywhere",
            classes="pa-8",
        )

if __name__ == "__main__":
    server.start()