Function useActiveBreakpoint

  • Hook to get the active breakpoint

    Parameters

    • breakpoints: Breakpoints

      Object containing the breakpoints, MUST be in ascending order

      // 1-767px: mobile, 768-1023px: tablet, 1024px+: desktop
      const breakpoint = useActiveBreakpoint({ mobile: '0px', tablet: '768px', desktop: '1024px' });

    Returns string