Hooks
Functions
useResponsive
A hooks for getting responsive information
Example
'use client'
import useResponsive from '@/utils/hooks/useResponsive'
const Component = () => {
const { larger, smaller, windowWidth } = useResponsive()
return (...)
}
| return | Description | Type | Default |
|---|---|---|---|
| larger | Breakpoints with statement that larger than current window width | {2xl: boolean, xl: boolean, lg: boolean, md: boolean, sm: boolean, xs: boolean} | - |
| smaller | Breakpoints with statement that smaller than current window width | {2xl: boolean, xl: boolean, lg: boolean, md: boolean, sm: boolean, xs: boolean} | - |
| windowWidth | Current window width | number | - |