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.2.0.tar.gz (92.7 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.2.0-py3-none-any.whl (59.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spaday_regular_layout-0.2.0.tar.gz
  • Upload date:
  • Size: 92.7 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.2.0.tar.gz
Algorithm Hash digest
SHA256 05744845818486a2e4039f4c43cac7e48f7260ba58c622ca78a1b78e7568e05b
MD5 ecbcef42a5147a3af279ae50b83cffb2
BLAKE2b-256 a7f950b481843b8abc7abd4127360824771ef636a102942733b32dcc38b2fce7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spaday_regular_layout-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68b35e90675db57bfa50b44616ac9186a7845e36f26fdf28edb9b1e61cf395b9
MD5 904a2cf69802f6a4253a858a73465be9
BLAKE2b-256 615713c2e0508857f0631854bc29b882ac5d959385ba7db1764a2ccec055c818

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