Skip to main content
useBreakpoints
@coinbase/cds-web@8.38.5
Returns an object with a boolean for each breakpoint of the window. Useful for conditionally rendering components or component trees based on the current window breakpoint.
import { useBreakpoints } from '@coinbase/cds-web/hooks/useBreakpoints'
Related components

Basic usage

Use the useBreakpoints hook to conditionally render components or component trees based on the current window breakpoint.

See how breakpoints are defined in the media object →

Warning

Do not use useBreakpoints for responsive styles. Use CSS media queries or the StyleProps API for responsive styles.

Loading...

Is this page useful?

Coinbase Design is an open-source, adaptable system of guidelines, components, and tools that aid the best practices of user interface design for crypto products.