UIInternal UI

Hooks

7 behavior hooks — tokens, viewport, press, toasts, scroll chaining, and focus.

useCssTokens

Reads live CSS custom-property values with a theme-change subscription. Backs the Foundations page.

@general-design-company/internal-ui/hooks/use-css-tokens

useMobile

Breakpoint hook. Undefined on first paint, then tracks matchMedia.

@general-design-company/internal-ui/hooks/use-mobile

Viewport is desktop — resize to watch it flip.

usePressOrigin

Writes the press point for the cursor-origin glow on buttons and fields.

@general-design-company/internal-ui/hooks/use-press-origin

useToast

Toast queue: toast() to fire, toasts to read, Toaster to render.

@general-design-company/internal-ui/hooks/use-toast

    useVerticalWheelChain

    Chains vertical wheel past horizontal scrollers to the page. Scroll vertically over the row below.

    @general-design-company/internal-ui/hooks/use-vertical-wheel-chain
    card-1card-2card-3card-4card-5card-6card-7card-8card-9card-10card-11card-12

    verticalWheelChain

    The pure helpers behind the hook: scrollability tests and the scroller class.

    @general-design-company/internal-ui/hooks/vertical-wheel-chain

    HORIZONTAL_SCROLL_CLASS = "overflow-x-auto overflow-y-clip"

    useRestoreFocusOnClose

    Returns focus to the opener when an overlay closes. Pass a mount signal.

    @general-design-company/internal-ui/lib/use-restore-focus-on-close