{"id":13436373,"url":"https://github.com/react-component/tooltip","last_synced_at":"2025-08-29T05:37:01.597Z","repository":{"id":27962032,"uuid":"31455048","full_name":"react-component/tooltip","owner":"react-component","description":"React Tooltip","archived":false,"fork":false,"pushed_at":"2025-08-19T06:47:39.000Z","size":6966,"stargazers_count":946,"open_issues_count":74,"forks_count":196,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-08-19T07:01:19.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://react-component.github.io/tooltip/","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":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"ant-design","patreon":null,"open_collective":"ant-design","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2015-02-28T07:32:28.000Z","updated_at":"2025-08-19T06:45:55.000Z","dependencies_parsed_at":"2023-09-22T12:55:50.631Z","dependency_job_id":"ae1484e0-1f83-4f92-be93-4c68d15bde57","html_url":"https://github.com/react-component/tooltip","commit_stats":{"total_commits":246,"total_committers":57,"mean_commits":4.315789473684211,"dds":0.6991869918699187,"last_synced_commit":"937c4bd7c490dddc8ec2f2d4e4bc3ef4e66b389f"},"previous_names":[],"tags_count":102,"template":false,"template_full_name":null,"purl":"pkg:github/react-component/tooltip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Ftooltip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Ftooltip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Ftooltip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Ftooltip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-component","download_url":"https://codeload.github.com/react-component/tooltip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Ftooltip/sbom","scorecard":{"id":765416,"data":{"date":"2025-08-11","repo":{"name":"github.com/react-component/tooltip","commit":"1b789e7a4cbdb8c67334c3a7d1d74620425295ef"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Code-Review","score":4,"reason":"Found 13/27 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/react-component-ci.yml:5: update your workflow using https://app.stepsecurity.io/secureworkflow/react-component/tooltip/react-component-ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/site-deploy.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/react-component/tooltip/site-deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/site-deploy.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/react-component/tooltip/site-deploy.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/site-deploy.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/react-component/tooltip/site-deploy.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/site-deploy.yml:25","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   1 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/react-component-ci.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/site-deploy.yml:9","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T00:37:48.998Z","repository_id":27962032,"created_at":"2025-08-23T00:37:48.998Z","updated_at":"2025-08-23T00:37:48.998Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272636166,"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":"2024-07-31T03:00:47.313Z","updated_at":"2025-08-29T05:37:01.590Z","avatar_url":"https://github.com/react-component.png","language":"TypeScript","readme":"# rc-tooltip\n\nReact Tooltip\n\n[![NPM version][npm-image]][npm-url]\n[![npm download][download-image]][download-url]\n[![build status][github-actions-image]][github-actions-url]\n[![Codecov][codecov-image]][codecov-url]\n[![bundle size][bundlephobia-image]][bundlephobia-url]\n[![dumi][dumi-image]][dumi-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-tooltip.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-tooltip\n[travis-image]: https://img.shields.io/travis/react-component/tooltip/master?style=flat-square\n[travis-url]: https://travis-ci.com/react-component/tooltip\n[github-actions-image]: https://github.com/react-component/tooltip/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/tooltip/actions\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/tooltip/master.svg?style=flat-square\n[codecov-url]: https://app.codecov.io/gh/react-component/tooltip\n[david-url]: https://david-dm.org/react-component/tooltip\n[david-image]: https://david-dm.org/react-component/tooltip/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/tooltip?type=dev\n[david-dev-image]: https://david-dm.org/react-component/tooltip/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/rc-tooltip.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-tooltip\n[bundlephobia-url]: https://bundlephobia.com/package/rc-tooltip\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-tooltip\n[dumi-url]: https://github.com/umijs/dumi\n[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square\n\n## Screenshot\n\n\u003cimg src=\"https://gtms03.alicdn.com/tps/i3/TB1NQUSHpXXXXaUXFXXlQqyZXXX-1312-572.png\" width=\"600\"/\u003e\n\n## Browsers support\n\n| [\u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png\" alt=\"IE / Edge\" width=\"24px\" height=\"24px\" /\u003e](http://godban.github.io/browsers-support-badges/)\u003c/br\u003eIE / Edge | [\u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png\" alt=\"Firefox\" width=\"24px\" height=\"24px\" /\u003e](http://godban.github.io/browsers-support-badges/)\u003c/br\u003eFirefox | [\u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png\" alt=\"Chrome\" width=\"24px\" height=\"24px\" /\u003e](http://godban.github.io/browsers-support-badges/)\u003c/br\u003eChrome | [\u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png\" alt=\"Safari\" width=\"24px\" height=\"24px\" /\u003e](http://godban.github.io/browsers-support-badges/)\u003c/br\u003eSafari | [\u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png\" alt=\"Opera\" width=\"24px\" height=\"24px\" /\u003e](http://godban.github.io/browsers-support-badges/)\u003c/br\u003eOpera |\n| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| IE 8 + ✔                                                                                                                                                                                                        | Firefox 31.0+ ✔                                                                                                                                                                                                   | Chrome 31.0+ ✔                                                                                                                                                                                                | Safari 7.0+ ✔                                                                                                                                                                                                 | Opera 30.0+ ✔                                                                                                                                                                                             |\n\n## Install\n\n[![rc-tooltip](https://nodei.co/npm/rc-tooltip.png)](https://npmjs.org/package/rc-tooltip)\n\n## Usage\n\n```js\nvar Tooltip = require('rc-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// 'rc-tooltip/assets/bootstrap_white.css'\n\nReactDOM.render(\n  \u003cTooltip placement=\"left\" trigger={['click']} overlay={\u003cspan\u003etooltip\u003c/span\u003e}\u003e\n    \u003ca href=\"#\"\u003ehover\u003c/a\u003e\n  \u003c/Tooltip\u003e,\n  container,\n);\n```\n\n## Examples\n\n`npm start` and then go to\n\u003chttp://localhost:8000/demo\u003e\n\nOnline demo: \u003chttps://react-component.github.io/tooltip/demo\u003e\n\n## API\n\n### Props\n\n| name                | type                                                               | default             | description                                                                                                                                                      |\n| ------------------- | ------------------------------------------------------------------ | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| trigger             | string \\| string\\[]                                                | 'hover'             | which actions cause tooltip shown. enum of 'hover','click','focus'                                                                                               |\n| visible             | boolean                                                            | false               | whether tooltip is visible                                                                                                                                       |\n| defaultVisible      | boolean                                                            | false               | whether tooltip is visible by default                                                                                                                            |\n| placement           | string                                                             | 'right'             | tooltip placement. enum of 'top','left','right','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom' |\n| motion              | object                                                             |                     | Config popup motion. Please ref demo for example                                                                                                                 |\n| onVisibleChange     | (visible: boolean) =\u003e void;                                        |                     | Callback when visible change                                                                                                                                     |\n| afterVisibleChange  | (visible: boolean) =\u003e void;                                        |                     | Callback after visible change                                                                                                                                    |\n| overlay             | ReactNode \\| () =\u003e ReactNode                                       |                     | tooltip overlay content                                                                                                                                          |\n| overlayStyle        | object                                                             |                     | deprecated, Please use `styles={{ root: {} }}`                                                                                                                   |\n| overlayClassName    | string                                                             |                     | deprecated, Please use `classNames={{ root: {} }}`                                                                                                               |\n| prefixCls           | string                                                             | 'rc-tooltip'        | prefix class name of tooltip                                                                                                                                     |\n| mouseEnterDelay     | number                                                             | 0                   | delay time (in second) before tooltip shows when mouse enter                                                                                                     |\n| mouseLeaveDelay     | number                                                             | 0.1                 | delay time (in second) before tooltip hides when mouse leave                                                                                                     |\n| getTooltipContainer | (triggerNode: HTMLElement) =\u003e HTMLElement                          | () =\u003e document.body | get container of tooltip, default to body                                                                                                                        |\n| destroyOnHidden     | boolean                                                            | false               | destroy tooltip when it is hidden                                                                                                                                |\n| align               | object                                                             |                     | align config of tooltip. Please ref demo for usage example                                                                                                       |\n| showArrow           | boolean \\| object                                                  | false               | whether to show arrow of tooltip                                                                                                                                 |\n| zIndex              | number                                                             |                     | config popup tooltip zIndex                                                                                                                                      |\n| classNames          | classNames?: { root?: string; body?: string;};                     |                     | Semantic DOM class                                                                                                                                               |\n| styles              | styles?: {root?: React.CSSProperties;body?: React.CSSProperties;}; |                     | Semantic DOM styles                                                                                                                                              |\n\n## Important Note\n\n`Tooltip` requires a child node that accepts an `onMouseEnter`, `onMouseLeave`, `onFocus`, `onClick` event. This means the child node must be a built-in component like `div` or `span`, or a custom component that passes its props to its built-in component child.\n\n## Accessibility\n\nFor accessibility purpose you can use the `id` prop to link your tooltip with another element. For example attaching it to an input element:\n\n```js\n\u003cTooltip\n    ...\n    id={this.props.name}\u003e\n    \u003cinput type=\"text\"\n           ...\n           aria-describedby={this.props.name}/\u003e\n\u003c/Tooltip\u003e\n```\n\nIf you do it like this, a screenreader would read the content of your tooltip if you focus the input element.\n\n**NOTE:** `role=\"tooltip\"` is also added to expose the purpose of the tooltip element to a screenreader.\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`rc-tooltip` is released under the MIT license.\n","funding_links":["https://github.com/sponsors/ant-design","https://opencollective.com/ant-design"],"categories":["Uncategorized","UI Components","UI Frameworks","Demos","\u003csummary\u003eUI Components\u003c/summary\u003e","TypeScript"],"sub_categories":["Uncategorized","Tooltip","Responsive"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Ftooltip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-component%2Ftooltip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Ftooltip/lists"}