{"id":28160082,"url":"https://github.com/giusdp/live_pane","last_synced_at":"2025-05-15T10:13:59.039Z","repository":{"id":288623238,"uuid":"968629600","full_name":"giusdp/live_pane","owner":"giusdp","description":"Resizable pane components for LiveView.","archived":false,"fork":false,"pushed_at":"2025-05-06T06:30:14.000Z","size":342,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T19:13:34.608Z","etag":null,"topics":["component-library","liveview","phoenix"],"latest_commit_sha":null,"homepage":"https://live-pane.fly.dev","language":"TypeScript","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/giusdp.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,"zenodo":null}},"created_at":"2025-04-18T12:37:48.000Z","updated_at":"2025-05-06T06:30:15.000Z","dependencies_parsed_at":"2025-04-20T11:48:36.877Z","dependency_job_id":null,"html_url":"https://github.com/giusdp/live_pane","commit_stats":null,"previous_names":["giusdp/live_pane"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giusdp%2Flive_pane","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giusdp%2Flive_pane/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giusdp%2Flive_pane/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giusdp%2Flive_pane/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giusdp","download_url":"https://codeload.github.com/giusdp/live_pane/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319671,"owners_count":22051076,"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":["component-library","liveview","phoenix"],"created_at":"2025-05-15T10:12:28.828Z","updated_at":"2025-05-15T10:13:59.028Z","avatar_url":"https://github.com/giusdp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Live Pane\n[![Elixir CI](https://github.com/giusdp/live_pane/actions/workflows/tests.yaml/badge.svg?branch=main)](https://github.com/giusdp/live_pane/actions/workflows/tests.yaml)\n[![Hex](https://img.shields.io/hexpm/v/live_pane)](https://hex.pm/packages/live_pane)\n\nA client-side, dependency-free, set hooks and components to easily create resizable panels in your Phoenix applications.\n\nThis project has taken a lot of inspiration and code from the work done by \n[paneforge](https://.github.com/svecosystem/paneforge) and [react-resizable-panels](https://github.com/bvaughn/react-resizable-panels).\n\n## Installation\n\nAdd `live_pane` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:live_pane, \"~\u003e 0.6.2\"}\n  ]\nend\n```\n\nThen open up your `app.js` and import/setup the hooks.\n\nIf you have a `package.json` file at the top of `assets`, you can add this to it:\n\n```json\n\"dependencies\": {\n  \"live_pane\": \"file:../deps/live_pane\",\n},\n```\n\nAnd then import the module:\n\n```javascript\nimport { createLivePaneHooks } from 'live_pane';\n```\n\nOr you can import the file directly:\n\n```javascript\n// this path would be relative to where your app.js happens to be.\nimport { createLivePaneHooks } from '../deps/live_pane'\n```\n\nFinally setup the hooks in your `app.js` file:\n\n```javascript\nconst { groupHook, paneHook, resizerHook } = createLivePaneHooks()\n\nlet Hooks = {}\nHooks.live_pane_group = groupHook;\nHooks.live_pane = paneHook;\nHooks.live_pane_resizer = resizerHook;\n\nlet liveSocket = new LiveSocket(\"/live\", Socket, {\n  hooks: Hooks,\n  ...\n})\n```\n\nAlso add `'../deps/live_pane/lib/**/*.*ex'` to your list of paths Tailwind will look for class names, in your\n`tailwind.config.js`:\n\n```javascript\n// assets/tailwind.config.js\n\nmodule.exports = {\n  content: [\n    './js/**/*.js',\n    '../lib/your_app_web.ex',\n    '../lib/your_app_web/**/*.*ex',\n    '../deps/live_pane/lib/**/*.*ex', \u003c-- add this line with the correct path\n  ]\n}\n```\n\n## Usage\n\nNow you can use the Group, Pane and Resizer components in your LiveView templates.\n\n```html\n\u003cLivePane.group id=\"demo\" class=\"h-[450px]\"\u003e\n  \u003cLivePane.pane group_id=\"demo\" id=\"demo_pane_1\" class=\"h-full flex items-center justify-center\"\u003e\n    One\n  \u003c/LivePane.pane\u003e\n\n  \u003cLivePane.resizer\n    id=\"demo-resizer\"\n    group_id=\"demo\"\n    class=\"flex h-full w-2 items-center justify-center\"\n  \u003e\n    \u003cdiv class=\"size-4 rounded-sm border bg-brand\"\u003e\u003c/div\u003e\n  \u003c/LivePane.resizer\u003e\n  \u003cLivePane.pane group_id=\"demo\" id=\"demo_pane_2\" class=\"h-full flex items-center justify-center\"\u003e\n    Two\n  \u003c/LivePane.pane\u003e\n\u003c/LivePane.group\u003e\n```\n\nJust make sure to set an `id` for the group and then use the same id in each pane and resizer for the `group_id` attribute, so they can be linked together.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiusdp%2Flive_pane","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiusdp%2Flive_pane","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiusdp%2Flive_pane/lists"}