{"id":29556536,"url":"https://github.com/nasaownsky/snap-react-modal","last_synced_at":"2025-08-31T15:15:01.966Z","repository":{"id":57689278,"uuid":"470629632","full_name":"nasaownsky/snap-react-modal","owner":"nasaownsky","description":"As easy as your fingers snap modal using createPortal.","archived":false,"fork":false,"pushed_at":"2022-03-24T16:35:25.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-02T16:44:59.835Z","etag":null,"topics":["modal","react-modal","typescript"],"latest_commit_sha":null,"homepage":"https://snap-components.netlify.app/?path=/story/snap-modal--basic","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/nasaownsky.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}},"created_at":"2022-03-16T14:56:09.000Z","updated_at":"2022-03-24T16:36:04.000Z","dependencies_parsed_at":"2022-09-26T20:53:29.417Z","dependency_job_id":null,"html_url":"https://github.com/nasaownsky/snap-react-modal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nasaownsky/snap-react-modal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasaownsky%2Fsnap-react-modal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasaownsky%2Fsnap-react-modal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasaownsky%2Fsnap-react-modal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasaownsky%2Fsnap-react-modal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nasaownsky","download_url":"https://codeload.github.com/nasaownsky/snap-react-modal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasaownsky%2Fsnap-react-modal/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265743054,"owners_count":23820962,"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":["modal","react-modal","typescript"],"created_at":"2025-07-18T10:36:27.848Z","updated_at":"2025-07-18T10:36:29.028Z","avatar_url":"https://github.com/nasaownsky.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# snap-react-modal\n\nAs easy as your fingers snap modal using `createPortal`.\n\nDemo: https://snap-components.netlify.app/?path=/story/snap-modal--basic\n\n## Install\n\n`npm install snap-react-modal`\n\n## As easy as your fingers snap 👌\n\n~~~js\n\u003cModal isOpen={isOpen} onClose={() =\u003e setOpen(false)}\u003e\n  This is so easy!\n\u003c/Modal\u003e\n~~~\n\n## Simply modify styles and control dimensions\n\n~~~js\nimport Modal from \"snap-react-modal\";\n\nfunction App() {\n  const [isOpen, setOpen] = React.useState(false);\n\n  return (\n    \u003cdiv className=\"App\"\u003e\n      \u003cbutton onClick={() =\u003e setOpen(true)}\u003eOpen Modal\u003c/button\u003e\n      \u003cModal\n        isOpen={isOpen}\n        onClose={() =\u003e setOpen(false)}\n        overlayClassName=\"overlayStyles\" //this class modifies overlay styles\n        modalClassName=\"modalStyles\" //and this modifies modal container\n        width={500} //easy to control dimensions\n        height={500}\n      \u003e\n        Still so easy!\n      \u003c/Modal\u003e\n    \u003c/div\u003e\n  );\n}\n~~~\n\n## Props\n\n- `isOpen`: defines if the modal open or not (required)\n- `onClose`: to close the modal (required)\n- `width`: defines the width of the modal\n- `height`: defines the height of the modal\n- `overlayClassName`: overrides overlay of the modal (note: please use `!important` property in your css to make sure styles will apply)\n- `modalClassName`: overrides main container of the modal (note: please use `!important` property in your css to make sure that styles will apply)\n- `closeButton`: defines if the default close button is showing\n- `closeOnClickOutside`: defines if the modal is closable on outside click\n- `isCentered`: defines if the modal is vertically centered (set false to enable scrollable wrapper)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasaownsky%2Fsnap-react-modal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnasaownsky%2Fsnap-react-modal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasaownsky%2Fsnap-react-modal/lists"}