# Resizable: Size readout

> `showSize` shows the panel before the divider while you drag or use the keyboard, in `"percent"` or `"pixels"`.

Example: https://hextaui.com/docs/resizable/examples/size
Component docs: https://hextaui.com/docs/resizable.md

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/resizable-size.json
```

This adds `components/examples/resizable/size.tsx` with the Resizable component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/resizable/size.tsx"
import {
  ResizableHandle,
  ResizablePanel,
  ResizablePanelGroup,
} from "@/components/ui/resizable"

export function ResizableSize() {
  return (
    <div className="h-56 w-full max-w-xl overflow-hidden rounded-xl border">
      <ResizablePanelGroup>
        <ResizablePanel defaultSize="320px" minSize="160px" maxSize="70%">
          <div className="flex h-full items-center justify-center text-sm font-medium">
            Canvas
          </div>
        </ResizablePanel>
        <ResizableHandle showSize="pixels" />
        <ResizablePanel minSize="20%">
          <div className="flex h-full items-center justify-center text-sm font-medium">
            Inspector
          </div>
        </ResizablePanel>
      </ResizablePanelGroup>
    </div>
  )
}
```

## Props in this example

### ResizablePanel

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultSize` | `number \| string` | – |  |
| `minSize` | `number \| string` | – |  |
| `maxSize` | `number \| string` | – |  |

### ResizableHandle

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `showSize` | `boolean \| "percent" \| "pixels"` | `false` |  |

## More Resizable examples

- [Collapsible](https://hextaui.com/docs/resizable/examples/collapsible.md)
- [Remember the layout](https://hextaui.com/docs/resizable/examples/persist.md)
- [Vertical](https://hextaui.com/docs/resizable/examples/vertical.md)
- [Visible grip](https://hextaui.com/docs/resizable/examples/handle.md)
- [Right to left](https://hextaui.com/docs/resizable/examples/rtl.md)
