# ResizablePanel

> A panel of a ResizablePanelGroup.

Source: https://ui.jcsoftdev.com/docs/components/resizable-panel

A panel of a ResizablePanelGroup. Sizes are percentages of the group.

## Import

```ts
import { ResizablePanel } from "@jcsoftdev/ui/containers";
```

Single-component entry points tree-shake to just this component: `@jcsoftdev/ui/containers/resizable`.

## Usage

```tsx
export const Default: Story = { render: () => <Demo direction="horizontal" /> };
```

_Source of the Storybook story._

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultSize` | `number` |  | Initial size in percent. Panels without one share what is left. |
| `minSize` | `number` |  | Percent, default 0. |
| `maxSize` | `number` |  | Percent, default 100. |

`*` marks a required prop.

It also accepts the native props of the element or primitive it renders (for example `className`, `id`, `aria-*` and event handlers).

## Storybook stories

- [Default](/storybook/?path=/story/containers-resizable--default)
- [Vertical](/storybook/?path=/story/containers-resizable--vertical)
- [Narrow](/storybook/?path=/story/containers-resizable--narrow)
- [Brutal Preset](/storybook/?path=/story/containers-resizable--brutal-preset)

## Source

`packages/ui/src/containers/resizable/resizable.tsx`
