useMediaQuery (code)
Get responsive value for the active breakpoint.
MediaQuery: xs, redBase
import { useMediaQuery } from '@mediahuis/chameleon-react'
Breakpoints
xs: 0 and up - Mobile (portrait) | Grid Fluid
sm: 375px and up - Mobile (landscape) | Grid Fluid
md: 768px and up - Tablet (portrait) | Grid Fluid
lg: 1024px and up - Desktop (13inch) / Tablet (landscape) | Grid Fluid
xl: 1320px and up - HD Desktop (15inch and up) | Grid Static: 1200
Only use this in clientside applications!
Although this hook will use the fallback value in serverside context. It's recommended to use it only in clientside applications. Under the hood we use .
Array
The default value will be used when window is not available.
MediaQuery: xs, redBase, dashed
import { useMediaQuery } from '@mediahuis/chameleon-react'
Object
MediaQuery: xs, redBase, dashed
import { useMediaQuery } from '@mediahuis/chameleon-react'