@acolorbright/react-hooks 中文文档教程
@acolorbright/react-hooks
ACB 的可重用 React hooks 包
Installation
npm install -E @acolorbright/react-hooks
Usage
后导入你需要的 hooks,例如:
安装 /code>
以下挂钩可用:
useAxeReact
- Implements Axe during developmentuseKeyboardFocus
- Adds class for keyboard focus stylinguseMediaQuery
- Provides media query interface to JSuseScrollLock
- Implements CSS class control for scroll lockinguseScrollPosition
- Provides window scroll coordinatesuseTabPanelInterface
- Adds keyboard and mouse controls for tab panel interface
@acolorbright/react-hooks
ACB's package for reusable React hooks
Installation
npm install -E @acolorbright/react-hooks
Usage
After installing import the hooks you need, for example:
import { useMediaQuery } from '@acolorbright/react-hooks
The following hooks are available:
useAxeReact
- Implements Axe during developmentuseKeyboardFocus
- Adds class for keyboard focus stylinguseMediaQuery
- Provides media query interface to JSuseScrollLock
- Implements CSS class control for scroll lockinguseScrollPosition
- Provides window scroll coordinatesuseTabPanelInterface
- Adds keyboard and mouse controls for tab panel interface
更多