useBreakpointValue ๐งช
A React Hook that returns different values based on different screen sizes in responsive design.
โ ๏ธ This API is still in the experimental stage and may be subject to change.
Import
import { useBreakpointValue } from 'rsuite';
Examples
Responsive avatar size
Responsive stack direction
API
useBreakpointValue
function useBreakpointValue<T>(
mediaQueries: Record<string | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs', T>,
options?: {
defaultValue?: T;
}
): T;