Skip to main content
sunpeak API

cn

Merges class names using clsx and tailwind-merge. Handles conditional classes, arrays, and deduplicates conflicting Tailwind utilities.

Import

Signature

Usage


prefersReducedMotion

Returns true if the user has enabled the “reduce motion” accessibility setting.

Import

Signature

Usage


isPrimarilyTouchDevice

Returns true if the primary input mechanism is coarse (touch). Checks the (pointer: coarse) media query.

Import

Signature

Usage

For host-reported device capabilities, use useDeviceCapabilities which reads the touch and hover values from the host context.

isHoverAvailable

Returns true if the primary input mechanism supports hover. Checks the (hover: hover) media query.

Import

Signature

Usage