reflex-resizable-panels


Namereflex-resizable-panels JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryA component for resizable panels
upload_time2024-05-15 15:43:25
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseApache-2.0
keywords reflex reflex-custom-components
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # resizable-panels

A Reflex custom component resizable-panels.

## Installation

```bash
pip install reflex-resizable-panels
```

## Usage

```python
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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "reflex-resizable-panels",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "reflex, reflex-custom-components",
    "author": null,
    "author_email": "Lendemor <contact@lendemor.dev>",
    "download_url": "https://files.pythonhosted.org/packages/f8/77/baf997a0f5a24e59f4b75f88accdbcfaf72f5ee7247cfa9f3e90e546833d/reflex_resizable_panels-0.0.1.tar.gz",
    "platform": null,
    "description": "# resizable-panels\n\nA Reflex custom component resizable-panels.\n\n## Installation\n\n```bash\npip install reflex-resizable-panels\n```\n\n## Usage\n\n```python\nfrom reflex import rx\nfrom reflex_resizable_panels import resizable_panels as rzp\n\ndef index():\n    return rx.box(\n        rzp.group(\n            rzp.panel(\"Header\", default_size=20, min_size=20),\n            rzp.handle(),\n            rzp.panel(\n                \"Content\",\n                background_color=rx.color(\"gray\", 10),\n                default_size=80,\n                min_size=20,\n            ),\n        ),\n        width=\"100vw\",\n        height=\"100vh\",\n    )\n```\n\n## API\n\n### PanelGroup\n- `children`: List of `Panel` and `Handle` components.\n- `auto_save_id`: `str` - ID to save the layout in LocalStorage.\n- `direction`: `Literal[\"horizontal\", \"vertical\"]` - Direction of the panels. Default is `horizontal`.\n- `onLayout`: Called when group layout changes.\n\n### Panel\n- `children`: `Component` - Content of the panel.\n- `default_size`: `int` - Default size of the panels.\n- `min_size`: `int` - Minimum size of the panels. Default is `10`.\n- `max_size`: `int` - Maximum size of the panels. Default is `100`.\n- `collapsible`: `bool` - If `True`, panel can be collapsed by resizing below `min_size`.\n- `collapsed_size`: The size of the panel when it is collapsed. Default is `0`.\n- `order`: `int` - Order of the panel in the group. Required when using panels in `rx.cond`\n\nDisclaimer:\n> Resizable panels don't work when used inside `rx.container`. However, `rx.container` inside resizable panels do work.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A component for resizable panels",
    "version": "0.0.1",
    "project_urls": {
        "Repository": "https://github.com/Lendemor/reflex-resizable-panels",
        "homepage": "https://github.com/Lendemor/reflex-resizable-panels",
        "source": "https://github.com/Lendemor/reflex-resizable-panels"
    },
    "split_keywords": [
        "reflex",
        " reflex-custom-components"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c6eb9b9d5b97f985526f1a3a5869a47bce524def87e9d75834fefa4ecd6da3ec",
                "md5": "2c868398b14f4a0f3b1f893ef93c4b19",
                "sha256": "d6f8c3f66fa39efb29cf2b85445694c9b1f09461ce153ef97cd9a41e34a686d7"
            },
            "downloads": -1,
            "filename": "reflex_resizable_panels-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2c868398b14f4a0f3b1f893ef93c4b19",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 3277,
            "upload_time": "2024-05-15T15:43:23",
            "upload_time_iso_8601": "2024-05-15T15:43:23.316492Z",
            "url": "https://files.pythonhosted.org/packages/c6/eb/9b9d5b97f985526f1a3a5869a47bce524def87e9d75834fefa4ecd6da3ec/reflex_resizable_panels-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f877baf997a0f5a24e59f4b75f88accdbcfaf72f5ee7247cfa9f3e90e546833d",
                "md5": "dfb59f712ed477d0ed1c6418facb1ddc",
                "sha256": "0c1401ce949b0c4a49b781bb138ecbd34d329dc399ecddd523238ba977dbfe1f"
            },
            "downloads": -1,
            "filename": "reflex_resizable_panels-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "dfb59f712ed477d0ed1c6418facb1ddc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 2941,
            "upload_time": "2024-05-15T15:43:25",
            "upload_time_iso_8601": "2024-05-15T15:43:25.339117Z",
            "url": "https://files.pythonhosted.org/packages/f8/77/baf997a0f5a24e59f4b75f88accdbcfaf72f5ee7247cfa9f3e90e546833d/reflex_resizable_panels-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-15 15:43:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Lendemor",
    "github_project": "reflex-resizable-panels",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "reflex-resizable-panels"
}
        
Elapsed time: 3.35066s