> ## 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.

# useTapSize

> Returns how much room the mount has: slot, panel or page.

```ts theme={null}
function useTapSize(): TapSize;
```

Returns how much room the mount has: `slot`, `panel` or `page`.

## Returns

[`TapSize`](/extensions/reference/frontend-api/TypeAlias.TapSize)

## Remarks

Expanding a widget mounts a second copy of the component in the panel rather
than resizing the one in the slot, so the change this hook reports is the
panel's own Widen and Narrow toggle moving between `panel` and `page`. Size
against the mount with a container query where CSS can do the work; this hook is
for the cases that need different markup. Throws `TAP_OUTSIDE_HOST` outside a
mount.

## Example

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

function Keywords({ rows }: { rows: { term: string }[] }) {
  const size = useTapSize();
  const shown = size === 'slot' ? rows.slice(0, 3) : rows;
  return (
    <TapTable
      columns={[{ key: 'term', label: 'Term' }]}
      rows={shown}
      rowKey={row => row.term}
    />
  );
}
```
