@react-awesome/use-breakpoint
Version:
useBreakpoint triggers callback when a container's size is equal to one specific breakpoint.
34 lines (24 loc) • 1.42 kB
Markdown
# @react-awesome/use-breakpoint
<p align="center">
<img alt="version" src="https://img.shields.io/npm/v/%40react-awesome%2Fuse-breakpoint" />
<img alt="coverage" src="https://img.shields.io/codecov/c/github/trinhthinh388/react-awesome-components/master?token=VQ8VJ7OECQ&flag=useBreakpoint" />
<img alt="license" src="https://img.shields.io/github/license/trinhthinh388/react-awesome-components" />
<img alt="build status" src="https://img.shields.io/github/actions/workflow/status/trinhthinh388/react-awesome-components/release.yml" />
<img alt="size" src="https://img.shields.io/bundlejs/size/%40react-awesome/use-breakpoint" />
</p>
**useBreakpoint** returns the current breakpoint of a element, contains useful utilities to work with user-defined breakpoints and automatically triggers
callback when the element's size is equal to a specific breakpoint.
Please refer to the [documentation](https://react-awesome-components.vercel.app/docs/use-breakpoint) for more information.
## Installation
```sh
yarn add @react-awesome/use-breakpoint
# or
npm i @react-awesome/use-breakpoint
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/trinhthinh388/react-awesome-components/blob/master/CONTRIBUTING.md)
for details.
## Licence
This project is licensed under the terms of the
[MIT license](https://github.com/trinhthinh388/react-awesome-components/blob/master/LICENSE).