Skip to content
Protocore Design Systemv1.6.9

/// hooks

Hooks

Six small, focused React hooks ship with @protocore/pds — the same ones the components use internally, exposed for your own composition.

  • useTheme

    Read and control the theme and accent from the nearest PdsProvider.

  • useMediaQuery

    SSR-safe media-query subscription, with a token-keyed useBreakpoint helper.

  • useControllableState

    The value / defaultValue / onChange pattern behind every PDS input.

  • useCopyToClipboard

    Copy a string with an auto-resetting `copied` flag and captured error.

  • useReducedMotion

    Reflects the user's prefers-reduced-motion setting.

  • useDensity

    Read the active UI density from the nearest PdsProvider.