Component docs
Loading
"use client";
import { Splitter } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
first (required) | ReactNode | — | — |
second (required) | ReactNode | — | — |
defaultValue | number | — | Initial value when uncontrolled. |
handleLabel | string | from messages: "Resize" | Accessible name of the handle (default from messages: "Resize"). |
max | number | — | — |
min | number | — | — |
onValueChange | (value: number) => void | — | Called with the new value (only when it changes). |
orientation | "horizontal" | "vertical" | — | Layout and arrow-key axis. |
step | number | 10 | Arrow-key step in percent (default 10). |
value | number | — | Current value (controlled); null where it means "nothing selected". |
firstrequiredReactNode
secondrequiredReactNode
defaultValuenumber
Initial value when uncontrolled.
handleLabeldefault from messages: "Resize"string
Accessible name of the handle (default from messages: "Resize").
maxnumber
minnumber
onValueChange(value: number) => void
Called with the new value (only when it changes).
orientation"horizontal" | "vertical"
Layout and arrow-key axis.
stepdefault 10number
Arrow-key step in percent (default 10).
valuenumber
Current value (controlled); null where it means "nothing selected".
Other props are passed to the root element (HTMLAttributes<HTMLDivElement>), including className, style, id and aria-* attributes.
const left = <div>Files</div>;
const right = <div>Preview</div>;
<Splitter first={left} second={right} />