{"id":13628046,"url":"https://github.com/vrimar/mithril-portal","last_synced_at":"2025-04-17T00:33:04.886Z","repository":{"id":19316190,"uuid":"86641422","full_name":"vrimar/mithril-portal","owner":"vrimar","description":"Mithril component for rendering inline children to document.body","archived":false,"fork":false,"pushed_at":"2024-02-04T15:22:03.000Z","size":218,"stargazers_count":15,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T11:52:27.713Z","etag":null,"topics":["mithril","portal"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vrimar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-03-30T00:25:21.000Z","updated_at":"2024-11-06T18:31:41.000Z","dependencies_parsed_at":"2024-08-01T22:51:52.936Z","dependency_job_id":null,"html_url":"https://github.com/vrimar/mithril-portal","commit_stats":null,"previous_names":["vasilrimar/mithril-portal"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrimar%2Fmithril-portal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrimar%2Fmithril-portal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrimar%2Fmithril-portal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrimar%2Fmithril-portal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vrimar","download_url":"https://codeload.github.com/vrimar/mithril-portal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249293153,"owners_count":21245687,"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":["mithril","portal"],"created_at":"2024-08-01T22:00:43.669Z","updated_at":"2025-04-17T00:33:04.669Z","avatar_url":"https://github.com/vrimar.png","language":"TypeScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Mithril-Portal\n\nMithril component for rendering children outside the DOM hierarchy of the parent component.\n\n## Why\n\nMithril-portal mounts a component/children to a `div` that is appended to `document.body`. This is useful for UI related components such as modals, popovers, dropdowns, etc. where rendering inline would cause css overflow/z-index issues.\n\n## Installation\n\n```\nnpm install --save mithril-portal\n```\n\n## Usage\n```javascript\nimport m from 'mithril';\nimport Portal from 'mithril-portal';\n\nconst Page = {\n  view() {\n    return m('', [\n      m(Portal, m('h1', 'Children'))\n    ])\n  }\n}\n```\n\n## API\n\n| Attribute                    \t| Description                                                                               \t|\n|-----------------------------\t|-------------------------------------------------------------------------------------------\t|\n| onContentMount(rootElement: HTMLElement) =\u003e void \t| Callback invoked when the portal has mounted. \t|\n| container: HTMLElement \t| Optional element to mount to (default is `document.body`) \t|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrimar%2Fmithril-portal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvrimar%2Fmithril-portal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrimar%2Fmithril-portal/lists"}