{"id":21166595,"url":"https://github.com/meemaw/react-micro-modal","last_synced_at":"2025-04-09T14:15:15.947Z","repository":{"id":34415583,"uuid":"178873115","full_name":"Meemaw/react-micro-modal","owner":"Meemaw","description":"Accessible, lightweight and configurable modal component with a11y-enabled.","archived":false,"fork":false,"pushed_at":"2025-04-07T21:59:47.000Z","size":3816,"stargazers_count":36,"open_issues_count":42,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T22:34:25.436Z","etag":null,"topics":["accessibility","frontend","javascript","micro","modal","react","typescript"],"latest_commit_sha":null,"homepage":"https://meemaw.github.io/react-micro-modal","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/Meemaw.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":"2019-04-01T13:48:09.000Z","updated_at":"2023-02-04T20:59:40.000Z","dependencies_parsed_at":"2023-10-01T14:25:42.266Z","dependency_job_id":"87e23af1-c4e7-4bc7-a0c1-a92f99c40068","html_url":"https://github.com/Meemaw/react-micro-modal","commit_stats":{"total_commits":150,"total_committers":5,"mean_commits":30.0,"dds":"0.42666666666666664","last_synced_commit":"267be19bac75b0ea689dc031e077ddb716ecf905"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meemaw%2Freact-micro-modal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meemaw%2Freact-micro-modal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meemaw%2Freact-micro-modal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meemaw%2Freact-micro-modal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Meemaw","download_url":"https://codeload.github.com/Meemaw/react-micro-modal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054193,"owners_count":21039952,"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":["accessibility","frontend","javascript","micro","modal","react","typescript"],"created_at":"2024-11-20T14:51:35.856Z","updated_at":"2025-04-09T14:15:15.925Z","avatar_url":"https://github.com/Meemaw.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-micro-modal\n\n[![npm](https://img.shields.io/npm/v/react-micro-modal.svg)](https://www.npmjs.com/package/react-micro-modal) [![](https://badgen.net/bundlephobia/minzip/react-micro-modal)](https://bundlephobia.com/result?p=react-micro-modal) ![CI](https://github.com/Meemaw/react-micro-modal/workflows/CI/badge.svg) [![codecov](https://codecov.io/gh/Meemaw/react-micro-modal/branch/master/graph/badge.svg?token=xdrppK2PPf)](https://codecov.io/gh/Meemaw/react-micro-modal) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\n_Accessible, lightweight and configurable modal component with a11y-enabled inspired by [Micromodal.js](https://github.com/Ghosh/micromodal)._\n\n### [Release notes](https://github.com/Meemaw/react-micro-modal/releases) | [Documentation](https://github.com/Meemaw/react-micro-modal/tree/master/docs)\n\n---\n\n- NPM: `npm install react-micro-modal`\n- Yarn: `yarn add react-micro-modal`\n\n---\n\n## Features\n\n- Micro bundle - 1.9 KB 📦\n- a11y friendly 👓\n- Supports nested modals\n- Focuses on the first focusable element within the modal\n- Traps focus inside the modal\n- Closes on document click\n- Closes on `Escape` keypress\n- Usage as controlled or uncontrolled component\n\n## Example\n\nHere is a minimal uncontrolled modal example in 3 lines of code.\n\n```tsx\nimport React from 'react';\nimport { render } from 'react-dom';\nimport MicroModal from 'react-micro-modal';\n\nconst App = () =\u003e {\n  return (\n    \u003cMicroModal trigger={(open) =\u003e \u003cdiv onClick={open}\u003eOpen!\u003c/div\u003e}\u003e\n      {(close) =\u003e \u003cbutton onClick={close}\u003eClose!\u003c/button\u003e}\n    \u003c/MicroModal\u003e\n  );\n};\n\nrender(\u003cApp /\u003e, document.getElementById('root'));\n```\n\n## Live Playground\n\nFor more examples of micro-modal in action, go to https://meemaw.github.io/react-micro-modal.\n\nOR\n\nTo run that demo on your own computer:\n\n- Clone this repository\n- `yarn install`\n- `yarn storybook`\n- Visit http://localhost:9001/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeemaw%2Freact-micro-modal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeemaw%2Freact-micro-modal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeemaw%2Freact-micro-modal/lists"}