1.1.0 • Published 3 years ago

bootstrap-5-breakpoint-react-hook v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

About

This React hook returns the current Bootstrap 5 breakpoint (xs, sm, md, lg, xl or xxl) based on the window width.

Install

npm i bootstrap-5-breakpoint-react-hook

Or

yarn add bootstrap-5-breakpoint-react-hook

Usage

  1. Include the hook:

    import useBreakpoint from 'bootstrap-5-breakpoint-react-hook';
  2. Use it where is needed:

    function App() {
     return (
       <div>
         Current breakpoint: {useBreakpoint()}
       </div>
     );
    }

License

Licensed under the MIT License, Copyright © 2021 AlexWebLab