{"id":26977358,"url":"https://github.com/zortax/leptos-resize","last_synced_at":"2025-04-03T12:19:18.693Z","repository":{"id":270768950,"uuid":"911389907","full_name":"zortax/leptos-resize","owner":"zortax","description":"Simple user-resizable split-view for the leptos web framework","archived":false,"fork":false,"pushed_at":"2025-01-06T21:00:17.000Z","size":43919,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T11:18:55.639Z","etag":null,"topics":["leptos"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zortax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-02T22:47:52.000Z","updated_at":"2025-01-06T21:05:07.000Z","dependencies_parsed_at":"2025-01-03T01:07:10.570Z","dependency_job_id":null,"html_url":"https://github.com/zortax/leptos-resize","commit_stats":null,"previous_names":["zortax/leptos-resize"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zortax%2Fleptos-resize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zortax%2Fleptos-resize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zortax%2Fleptos-resize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zortax%2Fleptos-resize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zortax","download_url":"https://codeload.github.com/zortax/leptos-resize/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246998177,"owners_count":20866696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["leptos"],"created_at":"2025-04-03T12:19:18.057Z","updated_at":"2025-04-03T12:19:18.686Z","avatar_url":"https://github.com/zortax.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Leptos Resize\n\n![Preview](https://github.com/zortax/leptos-resize/blob/main/preview.gif?raw=true)\n\nThis crate provides a simple user-resizable split container for the Leptos web\nframework. Horizontal and vertical splits are both supported.\n\n```rust\n#[component]\nfn MyComponent() -\u003e impl IntoView {\n  view! {\n    \u003cResizableSplit\u003e\n      \u003cdiv\u003e\"First\"\u003c/div\u003e\n      \u003cdiv\u003e\"Second\"\u003c/div\u003e\n    \u003c/ResizableSplit\u003e\n  }\n}\n```\n(See `examples` directory for a full CSR example)\n\n## Leptos compatibility\n\n| Crate version | Compatible Leptos version |\n|---------------|---------------------------|\n| 0.1 - 0.2     | 0.7                       |\n\n## Features\n\n- Horizontal and vertical split\n- Split ratio can be bound to `RwSignal`\n- Works with server-side rendering\n- Arbitrary number of splits\n- Nested splits\n\n### Split direction\n\nThe split direction can be changed by setting the `direction` property.\n\n```rust\n#[component]\nfn MyComponent() -\u003e impl IntoView {\n  view! {\n    // split the container horizontally\n    \u003cResizableSplit direction=SplitDirection::Column\u003e\n      \u003cdiv\u003e\"First\"\u003c/div\u003e\n      \u003cdiv\u003e\"Second\"\u003c/div\u003e\n    \u003c/ResizableSplit\u003e\n  }\n}\n```\n\n### Bind size percentages to signal\n\nThe size percentages can be bound to a `RwSignal` by setting the `percentages`\nproperty. The `RwSignal` should contain a `Vec` with one element less than the\namount of children you pass. The last percentage will always be calculated.\nThe values sum should be less than `100`.\n\n```rust\n#[component]\nfn MyComponent() -\u003e impl IntoView {\n  // the last childs size will be calculated (in this case 40.)\n  let percentages = RwSignal::new(vec![20., 40.]);\n\n  view! {\n    \u003cResizableSplit percentages\u003e\n      \u003cdiv\u003e\"First\"\u003c/div\u003e\n      \u003cdiv\u003e\"Second\"\u003c/div\u003e\n      \u003cdiv\u003e\"Third\"\u003c/div\u003e\n    \u003c/ResizableSplit\u003e\n  }\n}\n```\n\n### Nest multiple split containers\n\nThe `\u003cResizableSplit\u003e` container can also be nested to create more complex\nresizable layouts.\n\n```rust\n#[component]\nfn MyComponent() -\u003e impl IntoView {\n  view! {\n    \u003cResizableSplit\u003e\n      \u003cdiv\u003e\"First\"\u003c/div\u003e\n      \u003cResizableSplit direction=SplitDirection::Column\u003e\n        \u003cdiv\u003e\"Second\"\u003c/div\u003e\n        \u003cdiv\u003e\"Third\"\u003c/div\u003e\n      \u003c/ResizableSplit\u003e\n    \u003c/ResizableSplit\u003e\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzortax%2Fleptos-resize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzortax%2Fleptos-resize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzortax%2Fleptos-resize/lists"}