# usePointerEvent

Source: /tuil/docs/reference/packages/ink/api/use-pointer-event
Locale: en

function exported by @mwillbanks/tuil-ink.



{/* Generated by tooling/docs/generate-reference.ts. */}

## function [#function]

Public function exported by `@mwillbanks/tuil-ink`.

```ts
export function usePointerEvent(
  id: string,
  type: PointerEventType,
  listener: PointerListener,
  options: { readonly capture?: boolean; readonly enabled?: boolean } = {},
): void;
```

## Members [#members]

This declaration has no public members.

## Parameters [#parameters]

| Member     | Type                                                                   | Required | Description                                                                                             | Related types                                                                 |
| ---------- | ---------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| `id`       | `string`                                                               | Yes      | Supplies the `id` value as `string`.                                                                    | —                                                                             |
| `type`     | `PointerEventType`                                                     | Yes      | Supplies the `type` value as `PointerEventType`.                                                        | [`PointerEventType`](/tuil/docs/reference/packages/pointer/api/pointer-event-type) |
| `listener` | `PointerListener`                                                      | Yes      | Supplies the `listener` value as `PointerListener`.                                                     | —                                                                             |
| `options`  | `&#123; readonly capture?: boolean; readonly enabled?: boolean &#125;` | No       | Supplies the `options` value as `&#123; readonly capture?: boolean; readonly enabled?: boolean &#125;`. | —                                                                             |

## Returns [#returns]

`void` — Returns a value that satisfies `void`.

Related types: —

## Throws [#throws]

No thrown errors are documented for this declaration.

## Related types [#related-types]

No package-local related types.

## Source [#source]

[View the secondary source reference](https://github.com/mwillbanks/tuil/blob/main/packages/ink/src/pointer.ts)

## Package [#package]

[@mwillbanks/tuil-ink](/tuil/docs/reference/packages/ink)
