Skip to main content

spaday-regular-layout

Serializable, resizable panel layouts for spaday, powered by regular-layout.

Build Status codecov License PyPI

Documentation

Quick example

from spaday import serve
from spaday_regular_layout import RegularLayout, RegularLayoutFrame

layout = {
    "type": "split-layout",
    "orientation": "horizontal",
    "sizes": [0.3, 0.7],
    "children": [
        {"type": "tab-layout", "tabs": ["nav"]},
        {"type": "tab-layout", "tabs": ["main"]},
    ],
}

page = RegularLayout(
    RegularLayoutFrame("Navigation", name="nav"),
    RegularLayoutFrame("Main", name="main"),
    layout=layout,
    style="height: 32rem",
).prop("class", "lorax")
serve(page, packages=["regular-layout"])

layout is the serializable split/tab tree returned by upstream save(). Bind it to application state to restore layouts reactively. Browser changes emit regular-layout-update; use a spaday event action to persist event.detail.

Run the local example

python -m pip install -e ".[examples]"
python -m spaday_regular_layout.example

Open http://127.0.0.1:8013 to resize and rearrange the complete three-panel example. It receives a new server layout every five seconds and persists browser rearrangements back to Python. It passes the local package descriptor directly, so it does not install or resolve the integration from GitHub.

Download files

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

Source Distribution

spaday_regular_layout-0.1.0.tar.gz (92.6 kB view details)

Uploaded Source

Built Distribution

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

spaday_regular_layout-0.1.0-py3-none-any.whl (59.1 kB view details)

Uploaded Python 3

File details

Details for the file spaday_regular_layout-0.1.0.tar.gz.

File metadata

  • Download URL: spaday_regular_layout-0.1.0.tar.gz
  • Upload date:
  • Size: 92.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for spaday_regular_layout-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6f2318356655ba2a62c56e0d1fdb495ef6f0303bb5a85a03da747f76a989b59d
MD5 5b3b460910ed13420108e5e637ef9190
BLAKE2b-256 246fc76ad9a9c743767aea17563b35d5c570b580aa0d45d4a600345f42704ee5

See more details on using hashes here.

File details

Details for the file spaday_regular_layout-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for spaday_regular_layout-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7ced397ffde7cf9558c172fb1128482088d76d348cc843756dfacd37e270ba0
MD5 739b5db10fbb4d82f3215b86c48c65e5
BLAKE2b-256 2b0876b99d3993807ef463014ad299909ec5398f5d3fc1287b511fa125234381

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page