Skip to content
Projetos

Sobre

Painéis divididos redimensionáveis para React, derivados do VS Code.

Desenvolvimento web e de aplicativos

Como estes números são medidos

Crescimento medido de estrelas

em 24 h
0
em 7 dias
+1
em 15 dias
+1
em 1 mês
+1

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

CI status npm version npm downloads Bundle size Types License

Logo

Allotment

React split-pane component.

Docs · Examples · API · Changelog

  • React-based: Integrate effortlessly into your existing React-based application.
  • Industry standard look and feel: Like VS Code's split view implementation? You're in luck! This component is derived from the same codebase.
  • Dynamic: Want to declaratively add and remove panes? We've got you covered.
  • Flexible: Snap panes closed, nest split views, show and hide panes, and persist sizes across reloads.
  • Typed: Written in TypeScript, with type definitions included.

Quick start

npm install allotment

Allotment requires React 17, 18 or 19 (react and react-dom are peer dependencies).

import { Allotment } from "allotment";
import "allotment/dist/style.css";

export const App = () => (
  <div style={{ height: 400 }}>
    <Allotment>
      <div>Pane A</div>
      <div>Pane B</div>
    </Allotment>
  </div>
);

Allotment fills its parent element, so make sure the parent has a height. See the FAQ if nothing is showing.

Documentation

The documentation has live examples of everything Allotment can do.

Alternatives

Allotment aims to reproduce the behaviour of VS Code's split view. If you need something different, react-resizable-panels is a popular alternative.

Contributing

Contributions are welcome! See the contributing guide to get started, and please follow the Code of Conduct.

Notable changes are recorded in the changelog.

License

Allotment is released under the MIT License.

Explore projetos relacionados

Carregando…