一个简单的钩子,用于在 React 中创建完全可访问的下拉菜单-源码

上传者: 42134285 | 上传时间: 2021-06-09 13:04:02 | 文件大小: 538KB | 文件类型: ZIP
React Accessible Dropdown Menu Hook 这个 Hook 在构建下拉菜单、下拉按钮等时处理所有可访问性逻辑,并让设计完全由您决定。 当您在菜单外部单击时,它还处理关闭菜单的逻辑。 :wheelchair_symbol: 完全可访问 :package: 完全用 TypeScript 编写 :microscope: 经过彻底测试 :high_voltage: 零依赖 :sparkles: 小尺寸 快速入门 使用 Yarn 或 npm 安装: yarn add react-accessible-dropdown-menu-hook npm install react-accessible-dropdown-menu-hook 导入 Hook :从'react-accessible-dropdown-menu-hook'导入useDropdownMenu; 调用 Hook,告诉它你的菜单有多少项: const { buttonProps, itemProps, isOpen, setIsOpen } = useDropdownMenu(numberOfItems)

文件下载

资源详情

( 57 个子文件 538KB ) 一个简单的钩子,用于在 React 中创建完全可访问的下拉菜单-源码
react-accessible-dropdown-menu-hook-master
.eslintrc.json 39B
tsconfig.build.json 180B
.github
pull_request_template.md 128B
workflows
main.yml 4.27KB
yarn.lock 217.54KB
.prettierignore 50B
src
use-dropdown-menu.test.tsx 11.70KB
use-dropdown-menu.ts 6.40KB
jest-setup.ts 36B
website
.eslintrc.json 201B
docusaurus.config.js 2.09KB
yarn.lock 434.34KB
src
pages
index.tsx 2.46KB
styles.module.css 607B
demo.tsx 3.56KB
css
custom.css 2.48KB
babel.config.js 88B
sidebars.js 199B
tsconfig.json 197B
README.md 745B
docs
getting-started
using.md 833B
import.md 518B
install.md 545B
design
return-object.md 2.24KB
accessibility.md 1.58KB
.gitignore 233B
package.json 1.35KB
static
.nojekyll 0B
img
undraw_web_browsing.svg 11.86KB
favicon.ico 15.04KB
undraw_online_test.svg 8.16KB
undraw_appreciation.svg 8.62KB
logo.png 3.81KB
Logo.sketch 35.24KB
.prettierrc.json 113B
CONTRIBUTING.md 5.29KB
tsconfig.base.json 384B
tsconfig.json 110B
LICENSE 1.04KB
README.md 2.91KB
jest.config.ts 465B
.gitignore 87B
.eslintignore 91B
package.json 2.11KB
test-projects
.eslintrc.json 40B
browser
public
index.html 295B
yarn.lock 518.55KB
src
index.tsx 167B
app.tsx 1.06KB
app.css 118B
app.test.ts 4.68KB
react-app-env.d.ts 40B
tsconfig.json 470B
jest.config.ts 470B
.gitignore 324B
package.json 1.15KB
eslint.base.json 873B
[{"title":"( 57 个子文件 538KB ) 一个简单的钩子,用于在 React 中创建完全可访问的下拉菜单-源码","children":[{"title":"react-accessible-dropdown-menu-hook-master","children":[{"title":".eslintrc.json <span style='color:#111;'> 39B </span>","children":null,"spread":false},{"title":"tsconfig.build.json <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":".github","children":[{"title":"pull_request_template.md <span style='color:#111;'> 128B </span>","children":null,"spread":false},{"title":"workflows","children":[{"title":"main.yml <span style='color:#111;'> 4.27KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"yarn.lock <span style='color:#111;'> 217.54KB </span>","children":null,"spread":false},{"title":".prettierignore <span style='color:#111;'> 50B </span>","children":null,"spread":false},{"title":"src","children":[{"title":"use-dropdown-menu.test.tsx <span style='color:#111;'> 11.70KB </span>","children":null,"spread":false},{"title":"use-dropdown-menu.ts <span style='color:#111;'> 6.40KB </span>","children":null,"spread":false}],"spread":true},{"title":"jest-setup.ts <span style='color:#111;'> 36B </span>","children":null,"spread":false},{"title":"website","children":[{"title":".eslintrc.json <span style='color:#111;'> 201B </span>","children":null,"spread":false},{"title":"docusaurus.config.js <span style='color:#111;'> 2.09KB </span>","children":null,"spread":false},{"title":"yarn.lock <span style='color:#111;'> 434.34KB </span>","children":null,"spread":false},{"title":"src","children":[{"title":"pages","children":[{"title":"index.tsx <span style='color:#111;'> 2.46KB </span>","children":null,"spread":false},{"title":"styles.module.css <span style='color:#111;'> 607B </span>","children":null,"spread":false},{"title":"demo.tsx <span style='color:#111;'> 3.56KB </span>","children":null,"spread":false}],"spread":true},{"title":"css","children":[{"title":"custom.css <span style='color:#111;'> 2.48KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"babel.config.js <span style='color:#111;'> 88B </span>","children":null,"spread":false},{"title":"sidebars.js <span style='color:#111;'> 199B </span>","children":null,"spread":false},{"title":"tsconfig.json <span style='color:#111;'> 197B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 745B </span>","children":null,"spread":false},{"title":"docs","children":[{"title":"getting-started","children":[{"title":"using.md <span style='color:#111;'> 833B </span>","children":null,"spread":false},{"title":"import.md <span style='color:#111;'> 518B </span>","children":null,"spread":false},{"title":"install.md <span style='color:#111;'> 545B </span>","children":null,"spread":false}],"spread":false},{"title":"design","children":[{"title":"return-object.md <span style='color:#111;'> 2.24KB </span>","children":null,"spread":false},{"title":"accessibility.md <span style='color:#111;'> 1.58KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":".gitignore <span style='color:#111;'> 233B </span>","children":null,"spread":false},{"title":"package.json <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false},{"title":"static","children":[{"title":".nojekyll <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"img","children":[{"title":"undraw_web_browsing.svg <span style='color:#111;'> 11.86KB </span>","children":null,"spread":false},{"title":"favicon.ico <span style='color:#111;'> 15.04KB </span>","children":null,"spread":false},{"title":"undraw_online_test.svg <span style='color:#111;'> 8.16KB </span>","children":null,"spread":false},{"title":"undraw_appreciation.svg <span style='color:#111;'> 8.62KB </span>","children":null,"spread":false},{"title":"logo.png <span style='color:#111;'> 3.81KB </span>","children":null,"spread":false},{"title":"Logo.sketch <span style='color:#111;'> 35.24KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":".prettierrc.json <span style='color:#111;'> 113B </span>","children":null,"spread":false},{"title":"CONTRIBUTING.md <span style='color:#111;'> 5.29KB </span>","children":null,"spread":false},{"title":"tsconfig.base.json <span style='color:#111;'> 384B </span>","children":null,"spread":false},{"title":"tsconfig.json <span style='color:#111;'> 110B </span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 2.91KB </span>","children":null,"spread":false},{"title":"jest.config.ts <span style='color:#111;'> 465B </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 87B </span>","children":null,"spread":false},{"title":".eslintignore <span style='color:#111;'> 91B </span>","children":null,"spread":false},{"title":"package.json <span style='color:#111;'> 2.11KB </span>","children":null,"spread":false},{"title":"test-projects","children":[{"title":".eslintrc.json <span style='color:#111;'> 40B </span>","children":null,"spread":false},{"title":"browser","children":[{"title":"public","children":[{"title":"index.html <span style='color:#111;'> 295B </span>","children":null,"spread":false}],"spread":false},{"title":"yarn.lock <span style='color:#111;'> 518.55KB </span>","children":null,"spread":false},{"title":"src","children":[{"title":"index.tsx <span style='color:#111;'> 167B </span>","children":null,"spread":false},{"title":"app.tsx <span style='color:#111;'> 1.06KB </span>","children":null,"spread":false},{"title":"app.css <span style='color:#111;'> 118B </span>","children":null,"spread":false},{"title":"app.test.ts <span style='color:#111;'> 4.68KB </span>","children":null,"spread":false},{"title":"react-app-env.d.ts <span style='color:#111;'> 40B </span>","children":null,"spread":false}],"spread":false},{"title":"tsconfig.json <span style='color:#111;'> 470B </span>","children":null,"spread":false},{"title":"jest.config.ts <span style='color:#111;'> 470B </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 324B </span>","children":null,"spread":false},{"title":"package.json <span style='color:#111;'> 1.15KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"eslint.base.json <span style='color:#111;'> 873B </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明
服务器状态检查中...