bootstrap-5-breakpoint-react-hook
v1.1.0
Published
This React hook returns the current Bootstrap 5 breakpoint (xs, sm, md, lg, xl or xxl) based on the window width.
Downloads
187
Readme
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
Include the hook:
import useBreakpoint from 'bootstrap-5-breakpoint-react-hook';
Use it where is needed:
function App() { return ( <div> Current breakpoint: {useBreakpoint()} </div> ); }
License
Licensed under the MIT License, Copyright © 2021 AlexWebLab