@acolorbright/react-hooks 中文文档教程

发布于 3年前 浏览 12 项目主页 更新于 3年前

@acolorbright/react-hooks

ACB 的可重用 React hooks 包

Installation

npm install -E @acolorbright/react-hooks

Usage

后导入你需要的 hooks,例如:

安装 /code>

以下挂钩可用:

  • useAxeReact - Implements Axe during development
  • useKeyboardFocus - Adds class for keyboard focus styling
  • useMediaQuery - Provides media query interface to JS
  • useScrollLock - Implements CSS class control for scroll locking
  • useScrollPosition - Provides window scroll coordinates
  • useTabPanelInterface - 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 development
  • useKeyboardFocus - Adds class for keyboard focus styling
  • useMediaQuery - Provides media query interface to JS
  • useScrollLock - Implements CSS class control for scroll locking
  • useScrollPosition - Provides window scroll coordinates
  • useTabPanelInterface - Adds keyboard and mouse controls for tab panel interface
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文