{"id":30580593,"url":"https://github.com/react-component/m-tooltip","last_synced_at":"2026-03-16T23:36:07.294Z","repository":{"id":48428615,"uuid":"104218757","full_name":"react-component/m-tooltip","owner":"react-component","description":"React Tooltip for mobile","archived":false,"fork":false,"pushed_at":"2021-07-26T21:15:42.000Z","size":482,"stargazers_count":8,"open_issues_count":9,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-04-09T06:37:03.646Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/react-component.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-20T13:25:35.000Z","updated_at":"2021-10-09T08:37:08.000Z","dependencies_parsed_at":"2022-09-05T07:31:02.937Z","dependency_job_id":null,"html_url":"https://github.com/react-component/m-tooltip","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/react-component/m-tooltip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fm-tooltip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fm-tooltip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fm-tooltip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fm-tooltip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-component","download_url":"https://codeload.github.com/react-component/m-tooltip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fm-tooltip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272636236,"owners_count":24967983,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-08-29T05:37:50.120Z","updated_at":"2026-03-16T23:36:07.247Z","avatar_url":"https://github.com/react-component.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rmc-tooltip\n---\n\nReact Tooltip\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![gemnasium deps][gemnasium-image]][gemnasium-url]\n[![node version][node-image]][node-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: http://img.shields.io/npm/v/rmc-tooltip.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rmc-tooltip\n[travis-image]: https://img.shields.io/travis/react-component/m-tooltip.svg?style=flat-square\n[travis-url]: https://travis-ci.org/react-component/m-tooltip\n[coveralls-image]: https://img.shields.io/coveralls/react-component/m-tooltip.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/react-component/m-tooltip?branch=master\n[gemnasium-image]: http://img.shields.io/gemnasium/react-component/m-tooltip.svg?style=flat-square\n[gemnasium-url]: https://gemnasium.com/react-component/m-tooltip\n[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square\n[node-url]: http://nodejs.org/download/\n[download-image]: https://img.shields.io/npm/dm/rmc-tooltip.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rmc-tooltip\n\n## Screenshot\n\n\u003cimg src=\"http://gtms03.alicdn.com/tps/i3/TB1NQUSHpXXXXaUXFXXlQqyZXXX-1312-572.png\" width=\"600\"/\u003e\n\n## Install\n\n[![rmc-tooltip](https://nodei.co/npm/rmc-tooltip.png)](https://npmjs.org/package/rmc-tooltip)\n\n## Usage\n\n```js\nvar Tooltip = require('rmc-tooltip');\nvar React = require('react');\nvar ReactDOM = require('react-dom');\n\n// By default, the tooltip has no style.\n// Consider importing the stylesheet it comes with:\n// 'rmc-tooltip/assets/bootstrap_white.css'\n\nReactDOM.render(\u003cTooltip placement=\"left\" overlay={\u003cspan\u003etooltip\u003c/span\u003e}\u003e\u003ca href='#'\u003ehover\u003c/a\u003e\u003c/Tooltip\u003e, container);\n```\n\n## Examples\n\n`npm start` and then go to\n[http://localhost:8007/examples](http://localhost:8007/examples)\n\nOnline examples: [http://react-component.github.io/tooltip/examples/](http://react-component.github.io/tooltip/examples/)\n\n## API\n\n### Props\n\n\u003ctable class=\"table table-bordered table-striped\"\u003e\n    \u003cthead\u003e\n    \u003ctr\u003e\n        \u003cth style=\"width: 100px;\"\u003ename\u003c/th\u003e\n        \u003cth style=\"width: 50px;\"\u003etype\u003c/th\u003e\n        \u003cth style=\"width: 50px;\"\u003edefault\u003c/th\u003e\n        \u003cth\u003edescription\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eoverlayClassName\u003c/td\u003e\n          \u003ctd\u003estring\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003eadditional className added to popup overlay\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eoverlayStyle\u003c/td\u003e\n          \u003ctd\u003eObject\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003eadditional style of overlay node\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eprefixCls\u003c/td\u003e\n          \u003ctd\u003eString\u003c/td\u003e\n          \u003ctd\u003ermc-tooltip\u003c/td\u003e\n          \u003ctd\u003eprefix class name\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003etransitionName\u003c/td\u003e\n          \u003ctd\u003eString\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003esame as https://github.com/react-component/css-transition-group\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eonVisibleChange\u003c/td\u003e\n          \u003ctd\u003eFunction\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003ecall when visible is changed\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eafterVisibleChange\u003c/td\u003e\n          \u003ctd\u003eFunction\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003ecall after visible is changed\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003evisible\u003c/td\u003e\n          \u003ctd\u003eboolean\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003ewhether tooltip is visible\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003edefaultVisible\u003c/td\u003e\n          \u003ctd\u003eboolean\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003ewhether tooltip is visible initially\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eplacement\u003c/td\u003e\n          \u003ctd\u003eString\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003eone of ['left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight']\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003ealign\u003c/td\u003e\n          \u003ctd\u003eObject: alignConfig of [dom-align](https://github.com/yiminghe/dom-align)\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003evalue will be merged into placement's config\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eonPopupAlign\u003c/td\u003e\n          \u003ctd\u003efunction(popupDomNode, align)\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003ecallback when popup node is aligned\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eoverlay\u003c/td\u003e\n          \u003ctd\u003eReact.Element | () =\u003e React.Element\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003epopup content\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003earrowContent\u003c/td\u003e\n          \u003ctd\u003eReact.Node\u003c/td\u003e\n          \u003ctd\u003enull\u003c/td\u003e\n          \u003ctd\u003earrow content\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003egetTooltipContainer\u003c/td\u003e\n          \u003ctd\u003efunction\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003eFunction returning html node which will act as tooltip container. By default the tooltip attaches to the body. If you want to change the container, simply return a new element.\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003edestroyTooltipOnHide\u003c/td\u003e\n          \u003ctd\u003eboolean\u003c/td\u003e\n          \u003ctd\u003efalse\u003c/td\u003e\n          \u003ctd\u003ewhether destroy tooltip when tooltip is hidden\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Note\n\n`Tooltip` requires child node accepts `onClick` event.\n\n\n## Development\n\n```bash\nnpm install\nnpm start\n```\n\n## Test Case\n\n```bash\nnpm test\nnpm run chrome-test\n```\n\n## Coverage\n\n```bash\nnpm run coverage\n```\n\n## License\n\n`rmc-tooltip` is released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Fm-tooltip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-component%2Fm-tooltip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Fm-tooltip/lists"}