Skip to content
aq-ui
Back to HooksHook

Use Pointer Type

Open-code aq-ui React hook for Use Pointer Type.

Installation

pnpm dlx aq-ui@alpha add use-pointer-type

API reference

Client module

Import the parts you need, then jump to an export for its contract.

View full source

Quick start

"use client"

import { usePointerType } from "@/hooks/use-pointer-type"

const result = usePointerType()

PointerInputType

typeSource L5

Type contract for PointerInputType.

type PointerInputType = "mouse" | "pen" | "touch" | null

usePointerType

functionSource L38

Open-code aq-ui React hook for Use Pointer Type.

function usePointerType(defaultValue: PointerInputType = null): PointerInputType
Returns
PointerInputType

Parameters

NameTypeDefault
defaultValue?PointerInputTypenull
const result = usePointerType()

Files

  • hooks/use-pointer-type.ts

Source