> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tappify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# useTap

> Returns the whole bridge the host mounted this component with.

```ts theme={null}
function useTap(): Tap;
```

Returns the whole bridge the host mounted this component with.

## Returns

[`Tap`](/extensions/reference/frontend-api/Interface.Tap)

## Remarks

Throws `TapError` with code `TAP_OUTSIDE_HOST` when no Tappify mount is above
the component. The object it returns does not re-render the component when the
host changes a member; read through `useTapFilters`, `useTapTheme` and the
other slice hooks where that matters.

## Example

```tsx theme={null}
import { TapButton, useTap } from '@tappify/extension-sdk';

function CopyId() {
  const tap = useTap();
  return (
    <TapButton onClick={() => void tap.ui.copy(tap.project.id)}>
      Copy project id
    </TapButton>
  );
}
```
