Carregando…
Carregando…
Carregando…Two-pane split layout with draggable divider, horizontal or vertical direction.
$ npx kikitocn add resizable@/lib/utilsimport { Resizable } from "@/components/ui/cn/resizable/Resizable";
export function ResizableExample() {
return (
<Resizable direction="horizontal" />
);
}| Prop | Tipo | Padrão | Descrição |
|---|---|---|---|
children* | [ReactNode, ReactNode] | — | Dois painéis a separar com divisor arrastável |
direction | 'horizontal' | 'vertical' | 'horizontal' | Orientação da divisão |
defaultSize | number | 50 | Tamanho inicial do primeiro painel em % |
minSize | number | 10 | Tamanho mínimo em % |
maxSize | number | 90 | Tamanho máximo em % |
onResize | (size: number) => void | undefined | Callback com tamanho atual em % ao arrastar |
className | string | — | Classes extras pro container raiz |
style | CSSProperties | — | Estilos inline pro container raiz |
Resizable — drag the divider to resize panels (horizontal)
Panel A
Drag the divider ↔ (ou foca e usa as setas)
Panel B
This panel resizes too
Resizable — vertical
Top
Bottom