Skip to main content

Reflex custom component resizable-panels

Project description

resizable-panels

A Reflex custom component resizable-panels.

Installation

pip install reflex-resizable-panels

Usage

from reflex import rx
from reflex_resizable_panels import resizable_panels as rzp

def index():
    return rx.box(
        rzp.group(
            rzp.panel("Header", default_size=20, min_size=20),
            rzp.handle(),
            rzp.panel(
                "Content",
                background_color=rx.color("gray", 10),
                default_size=80,
                min_size=20,
            ),
        ),
        width="100vw",
        height="100vh",
    )

API

PanelGroup

  • children: List of Panel and Handle components.
  • auto_save_id: str - ID to save the layout in LocalStorage.
  • direction: Literal["horizontal", "vertical"] - Direction of the panels. Default is horizontal.
  • onLayout: Called when group layout changes.

Panel

  • children: Component - Content of the panel.
  • default_size: int - Default size of the panels.
  • min_size: int - Minimum size of the panels. Default is 10.
  • max_size: int - Maximum size of the panels. Default is 100.
  • collapsible: bool - If True, panel can be collapsed by resizing below min_size.
  • collapsed_size: The size of the panel when it is collapsed. Default is 0.
  • order: int - Order of the panel in the group. Required when using panels in rx.cond

Disclaimer:

Resizable panels don't work when used inside rx.container. However, rx.container inside resizable panels do work.

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

reflex_resizable_panels-0.0.1a1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

reflex_resizable_panels-0.0.1a1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file reflex_resizable_panels-0.0.1a1.tar.gz.

File metadata

File hashes

Hashes for reflex_resizable_panels-0.0.1a1.tar.gz
Algorithm Hash digest
SHA256 54eb5fd013b896d43d9703cdda19b5730bdc6403d9cca2a3241da25dfb2558f3
MD5 374dfb964fab394efe162cf49f8a4f9e
BLAKE2b-256 14eac3b81ccd099e3e90153fd20eb5e6e5ffb116776dc2974d594ef420d3cf58

See more details on using hashes here.

File details

Details for the file reflex_resizable_panels-0.0.1a1-py3-none-any.whl.

File metadata

File hashes

Hashes for reflex_resizable_panels-0.0.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 f5a2b898d747fba6eb006a7aed4300bf6fd0ff76605693794c973cc5070ae136
MD5 af5052e9827c463584ce2e077211fdcd
BLAKE2b-256 484a5fe180c0f1655b0bc7e523a68a61ca2a65254f11f5589c54eb78e7f25abe

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 Pingdom Monitoring Sentry Error logging StatusPage Status page