Skip to main content
Anvil2 exports several custom React hooks that can be used in your applications for common functionality like responsive design, accessibility, and more.

useAccessibleColor

A hook that returns the accessible color for a given color.

useAdaptiveView

A hook that detects the current adaptive view type based on device characteristics.

useBreakpoint

A hook that returns the breakpoint for a given width.

useMergeRefs

A hook that merges multiple refs into a single ref.

usePrefersColorScheme

A hook that returns the preferred color scheme for the user.

useSwipe

A hook that returns a function to handle swipe events.
Last modified on January 28, 2026