All components

Resizable

Adjust the space between two panels.

Examples

Adjust the space between two panels

Work items
Details
React code
import { Resizable, ResizableHandle } from "@accelerate/react/components";

export function Example() {
  return (
    <>
      <Resizable data-size="55" data-min="25" data-max="75">
        <div>Work items</div>
        <ResizableHandle aria-label="Resize work items and details"></ResizableHandle>
        <div>Details</div>
      </Resizable>
    </>
  );
}
Angular code
import { Component } from "@angular/core";
import { AccResizable, AccResizableHandle } from "@accelerate/angular/components";

@Component({
  selector: "app-example",
  imports: [
    AccResizable,
    AccResizableHandle,
  ],
  template: `
    <div accResizable data-size="55" data-min="25" data-max="75">
      <div>Work items</div>
      <button accResizableHandle aria-label="Resize work items and details"></button>
      <div>Details</div>
    </div>
  `,
})
export class Example {}

Vertical split

Editor
Output
React code
import { Resizable, ResizableHandle } from "@accelerate/react/components";

export function Example() {
  return (
    <>
      <Resizable data-orientation="vertical" data-size="45" style={{ "height": "12rem" }}>
        <div>Editor</div>
        <ResizableHandle aria-label="Resize editor and output"></ResizableHandle>
        <div>Output</div>
      </Resizable>
    </>
  );
}
Angular code
import { Component } from "@angular/core";
import { AccResizable, AccResizableHandle } from "@accelerate/angular/components";

@Component({
  selector: "app-example",
  imports: [
    AccResizable,
    AccResizableHandle,
  ],
  template: `
    <div accResizable data-orientation="vertical" data-size="45" style="height: 12rem">
      <div>Editor</div>
      <button accResizableHandle aria-label="Resize editor and output"></button>
      <div>Output</div>
    </div>
  `,
})
export class Example {}

Installation

Source preview. The expanded component catalog is ahead of the public npm releases. To run these examples in your own application, use packages built from the SDK source used for the previews or a release that includes the APIs below.

React
@accelerate/ui@0.4.0 and @accelerate/react@0.4.0
Angular
@accelerate/ui@0.4.0 and @accelerate/angular@0.2.0

Load @accelerate/ui/theme.css and put acc-theme on the app or the region using Accelerator components. See the framework setup guide for the theme and adapter conventions.

Usage

Place ResizableHandle between two direct child panels. Set data-min, data-max and data-size as percentages. Use data-orientation="vertical" and a definite height for stacked panels.

Import the React component Resizable from @accelerate/react/components. For Angular, add AccResizable to the standalone component’s imports and use <div accResizable>.

Examples use these React parts: Resizable, ResizableHandle. The Angular examples show the corresponding directives and template hosts.

API reference

data-size / data-min / data-max
Percentage split and bounds.
data-orientation
Vertical stacks panels and requires a definite height.
Keyboard
Use arrows, Home, and End on the handle.