AsterUIDocsv1.0.2

Docs / Component reference

ResizableSplit

Give two neighboring panes a movable divider. Adjust it with the pointer or the keyboard.

Resizable example

Install

sh
npx @fierst/ui@1.0.2 add resizable

Registry dependencies: theme, icon. Package dependencies: @lucide/icons.

Exports from ./ui/resizable: ResizableSplit.

Download the registry source for resizable 1.0.2.

API contracts

ts
export function* ResizableSplit(
  props: {
    direction?: 'horizontal' | 'vertical';
    defaultSplit?: number;
    min?: number;
    max?: number;
    height?: string;
    /** Automatically stack horizontal panes vertically on mobile (< 640px). Default: true. */
    stackOnMobile?: boolean;
    first: View;
    second: View;
    onResize?: (pct: number) => void;
    class?: string;
  },
  ctx: Ctx,
)