{"_id":"@rc-component/dropdown","_rev":"4537490","name":"@rc-component/dropdown","description":"dropdown ui component for react","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"afc163","email":""},{"name":"chenshuai2144","email":""},{"name":"madccc","email":""},{"name":"peachscript","email":""},{"name":"zombiej","email":""}],"time":{"modified":"2026-04-09T15:01:27.000Z","created":"2025-02-25T07:07:19.780Z","1.0.2":"2025-11-28T03:38:15.404Z","1.0.0":"2025-02-25T07:07:19.780Z"},"users":{},"repository":{"type":"git","url":"git+ssh://git@github.com/react-component/dropdown.git"},"versions":{"1.0.2":{"name":"@rc-component/dropdown","version":"1.0.2","description":"dropdown ui component for react","keywords":["react","react-dropdown"],"homepage":"http://github.com/react-component/dropdown","bugs":{"url":"http://github.com/react-component/dropdown/issues"},"repository":{"type":"git","url":"git+ssh://git@github.com/react-component/dropdown.git"},"license":"MIT","maintainers":[{"name":"afc163","email":""},{"name":"chenshuai2144","email":""},{"name":"madccc","email":""},{"name":"peachscript","email":""},{"name":"zombiej","email":""}],"main":"lib/index","module":"./es/index","scripts":{"build":"dumi build","compile":"father build && lessc assets/index.less assets/index.css","coverage":"rc-test --coverage","lint":"eslint src/ docs/examples/ --ext .tsx,.ts,.jsx,.js","now-build":"npm run build","prepare":"husky install && dumi setup","prepublishOnly":"npm run compile && rc-np","start":"dumi dev","test":"rc-test"},"lint-staged":{"**/*.{js,jsx,tsx,ts,md,json}":["prettier --write","git add"]},"dependencies":{"@rc-component/trigger":"^3.0.0","@rc-component/util":"^1.2.1","clsx":"^2.1.1"},"devDependencies":{"@rc-component/father-plugin":"^2.0.2","@rc-component/menu":"^1.0.0","@rc-component/np":"^1.0.3","@rc-component/resize-observer":"^1.0.0","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^14.0.0","@types/jest":"^29.0.0","@types/node":"^24.5.2","@types/react":"^18.0.0","@types/react-dom":"^18.0.0","@types/warning":"^3.0.0","@umijs/fabric":"^3.0.0","dumi":"^2.0.0","eslint":"^7.18.0","father":"^4.0.0","glob":"^10.0.0","husky":"^8.0.3","jest-environment-jsdom":"^29.5.0","less":"^4.1.1","lint-staged":"^13.2.1","prettier":"^2.8.7","rc-test":"^7.0.14","react":"^18.0.0","react-dom":"^18.0.0","typescript":"^5.0.0"},"peerDependencies":{"react":">=16.11.0","react-dom":">=16.11.0"},"_id":"@rc-component/dropdown@1.0.2","gitHead":"99ae51aee1812ad702a4e42fdf432576b1188efd","types":"./lib/index.d.ts","_nodeVersion":"22.8.0","_npmVersion":"11.6.0","dist":{"shasum":"c6010dac9e3ce0d7cf305523083d499dc779819e","size":8525,"noattachment":false,"key":"/@rc-component/dropdown/-/@rc-component/dropdown-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rc-component/dropdown/download/@rc-component/dropdown-1.0.2.tgz"},"_npmUser":{"name":"afc163","email":"afc163@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dropdown_1.0.2_1764301095212_0.6126533356766966"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-11-28T03:38:15.404Z","publish_time":1764301095404,"_source_registry_name":"default","_cnpm_publish_time":1764301095404},"1.0.0":{"name":"@rc-component/dropdown","version":"1.0.0","description":"dropdown ui component for react","keywords":["react","react-dropdown"],"homepage":"http://github.com/react-component/dropdown","bugs":{"url":"http://github.com/react-component/dropdown/issues"},"repository":{"type":"git","url":"git+ssh://git@github.com/react-component/dropdown.git"},"license":"MIT","maintainers":[{"name":"afc163","email":""},{"name":"chenshuai2144","email":""},{"name":"madccc","email":""},{"name":"peachscript","email":""},{"name":"zombiej","email":""}],"main":"lib/index","module":"./es/index","scripts":{"build":"dumi build","compile":"father build && lessc assets/index.less assets/index.css","coverage":"rc-test --coverage","lint":"eslint src/ docs/examples/ --ext .tsx,.ts,.jsx,.js","now-build":"npm run build","prepare":"husky install && dumi setup","prepublishOnly":"npm run compile && rc-np","start":"dumi dev","test":"rc-test"},"lint-staged":{"**/*.{js,jsx,tsx,ts,md,json}":["prettier --write","git add"]},"dependencies":{"@rc-component/trigger":"^3.0.0","@rc-component/util":"^1.2.1","classnames":"^2.2.6"},"devDependencies":{"@rc-component/father-plugin":"^2.0.2","@rc-component/np":"^1.0.3","@rc-component/resize-observer":"^1.0.0","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^14.0.0","@types/classnames":"^2.2.6","@types/jest":"^29.0.0","@types/react":"^18.0.0","@types/react-dom":"^18.0.0","@types/warning":"^3.0.0","@umijs/fabric":"^3.0.0","cross-env":"^7.0.0","dumi":"^2.0.0","eslint":"^7.18.0","father":"^4.0.0","glob":"^10.0.0","husky":"^8.0.3","jest-environment-jsdom":"^29.5.0","jquery":"^3.3.1","less":"^4.1.1","lint-staged":"^13.2.1","prettier":"^2.8.7","@rc-component/menu":"^1.0.0","rc-test":"^7.0.14","react":"^18.0.0","react-dom":"^18.0.0","regenerator-runtime":"^0.13.9","typescript":"^5.0.0"},"peerDependencies":{"react":">=16.11.0","react-dom":">=16.11.0"},"_id":"@rc-component/dropdown@1.0.0","gitHead":"6dafd0f3f178426c1e7e2a2f811c483182852508","types":"./lib/index.d.ts","_nodeVersion":"22.5.1","_npmVersion":"10.8.2","dist":{"shasum":"2d75e2f2088485f062beb4aae0386a3a27fa7f2d","size":8506,"noattachment":false,"key":"/@rc-component/dropdown/-/@rc-component/dropdown-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rc-component/dropdown/download/@rc-component/dropdown-1.0.0.tgz"},"_npmUser":{"name":"zombiej","email":"smith3816@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dropdown_1.0.0_1740467239587_0.30351827810879106"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-02-25T07:07:19.780Z","publish_time":1740467239780,"_source_registry_name":"default","_cnpm_publish_time":1740467239780}},"readme":"# @rc-component/dropdown\n\nreact dropdown component.\n\n[![NPM version][npm-image]][npm-url] [![npm download][download-image]][download-url] [![build status][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] [![bundle size][bundlephobia-image]][bundlephobia-url] [![dumi][dumi-image]][dumi-url]\n\n[npm-image]: https://img.shields.io/npm/v/@rc-component/dropdown.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@rc-component/dropdown\n[travis-image]: https://img.shields.io/travis/react-component/dropdown/master?style=flat-square\n[travis-url]: https://travis-ci.com/react-component/dropdown\n[github-actions-image]: https://github.com/react-component/dropdown/actions/workflows/ci.yml/badge.svg\n[github-actions-url]: https://github.com/react-component/dropdown/actions/workflows/ci.yml\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/dropdown/master.svg?style=flat-square\n[codecov-url]: https://app.codecov.io/gh/react-component/dropdown\n[david-url]: https://david-dm.org/react-component/dropdown\n[david-image]: https://david-dm.org/react-component/dropdown/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/dropdown?type=dev\n[david-dev-image]: https://david-dm.org/react-component/dropdown/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/@rc-component/dropdown.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@rc-component/dropdown\n[bundlephobia-url]: https://bundlephobia.com/package/@rc-component/dropdown\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/@rc-component/dropdown\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![](https://t.alipayobjects.com/images/rmsweb/T1bWpgXgBaXXXXXXXX.png)\n\n## Example\n\nonline example: http://react-component.github.io/dropdown/examples/\n\n## install\n\n[![@rc-component/dropdown](https://nodei.co/npm/@rc-component/dropdown.png)](https://npmjs.org/package/@rc-component/dropdown)\n\n## Usage\n\n```js\nvar Dropdown = require('@rc-component/dropdown');\n// use dropdown\n```\n\n## API\n\n### props\n\n<table class=\"table table-bordered table-striped\">\n    <thead>\n    <tr>\n        <th style=\"width: 100px;\">name</th>\n        <th style=\"width: 50px;\">type</th>\n        <th style=\"width: 50px;\">default</th>\n        <th>description</th>\n    </tr>\n    </thead>\n    <tbody>\n        <tr>\n          <td>overlayClassName</td>\n          <td>String</td>\n          <td></td>\n          <td>additional css class of root dom node</td>\n        </tr>\n        <tr>\n          <td>openClassName</td>\n          <td>String</td>\n          <td>`${prefixCls}-open`</td>\n          <td>className of trigger when dropdown is opened</td>\n        </tr>\n        <tr>\n          <td>prefixCls</td>\n          <td>String</td>\n          <td>rc-dropdown</td>\n          <td>prefix class name</td>\n        </tr>\n        <tr>\n          <td>transitionName</td>\n          <td>String</td>\n          <td></td>\n          <td>dropdown menu's animation css class name</td>\n        </tr>\n        <tr>\n          <td>animation</td>\n          <td>String</td>\n          <td></td>\n          <td>part of dropdown menu's animation css class name</td>\n        </tr>\n        <tr>\n          <td>placement</td>\n          <td>String</td>\n          <td>bottomLeft</td>\n          <td>Position of menu item. There are: top, topCenter, topRight, bottomLeft, bottom, bottomRight </td>\n        </tr>\n        <tr>\n          <td>onVisibleChange</td>\n          <td>Function</td>\n          <td></td>\n          <td>call when visible is changed</td>\n        </tr>\n        <tr>\n          <td>visible</td>\n          <td>boolean</td>\n          <td></td>\n          <td>whether tooltip is visible</td>\n        </tr>\n        <tr>\n          <td>defaultVisible</td>\n          <td>boolean</td>\n          <td></td>\n          <td>whether tooltip is visible initially</td>\n        </tr>\n        <tr>\n          <td>overlay</td>\n          <td>rc-menu</td>\n          <td></td>\n          <td><a href=\"https://github.com/react-component/menu\">rc-menu</a> element</td>\n        </tr>\n        <tr>\n          <td>onOverlayClick</td>\n          <td>function(e)</td>\n          <td></td>\n          <td>call when overlay is clicked</td>\n        </tr>\n        <tr>\n          <td>minOverlayWidthMatchTrigger</td>\n          <td>boolean</td>\n          <td>true (false when set alignPoint)</td>\n          <td>whether overlay's width must not be less than trigger's </td>\n        </tr>\n        <tr>\n          <td>getPopupContainer</td>\n          <td>Function(menuDOMNode): HTMLElement</td>\n          <th>() => document.body</th>\n          <td>Where to render the DOM node of dropdown</td>\n        </tr>\n    </tbody>\n</table>\n\nNote: Additional props are passed into the underlying [rc-trigger](https://github.com/react-component/trigger) component. This can be useful for example, to display the dropdown in a separate [portal](https://reactjs.org/docs/portals.html)-driven window via the `getDocument()` rc-trigger prop.\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\nopen coverage/ dir\n\n## License\n\n@rc-component/dropdown is released under the MIT license.\n","_attachments":{},"homepage":"http://github.com/react-component/dropdown","bugs":{"url":"http://github.com/react-component/dropdown/issues"},"license":"MIT"}