All Projects → ticlo → rc-dock

ticlo / rc-dock

Licence: Apache-2.0 license
Dock Layout for React Component

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
Less
1899 projects
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to rc-dock

dockview
Zero dependency layout manager and builder with ReactJS support
Stars: ✭ 45 (-85.85%)
Mutual labels:  drag-and-drop, layout, drag, drop, tabs, dock
image-uploader
Simple Drag & Drop image uploader plugin to static forms, without using AJAX
Stars: ✭ 70 (-77.99%)
Mutual labels:  drag-and-drop, drag, drop
KDRearrangeableCollectionViewFlowLayout
A Drag and Rearrange UICollectionView through its layout
Stars: ✭ 73 (-77.04%)
Mutual labels:  drag-and-drop, drag, drop
Ng2 Dnd
Angular 2 Drag-and-Drop without dependencies
Stars: ✭ 861 (+170.75%)
Mutual labels:  drag-and-drop, drag, drop
drop
A LÖVE visualizer and music player
Stars: ✭ 17 (-94.65%)
Mutual labels:  drag-and-drop, drag, drop
react-native-dnd-board
A drag and drop Kanban board for React Native.
Stars: ✭ 41 (-87.11%)
Mutual labels:  drag-and-drop, drag, drop
Kddraganddropcollectionview
This component allows for the transfer of data items between collection views through drag and drop
Stars: ✭ 476 (+49.69%)
Mutual labels:  drag-and-drop, drag, drop
Smooth Dnd
drag and drop library for javascript
Stars: ✭ 408 (+28.3%)
Mutual labels:  drag-and-drop, drag, drop
React Smooth Dnd
react wrapper components for smooth-dnd
Stars: ✭ 1,560 (+390.57%)
Mutual labels:  drag-and-drop, drag, drop
Gong Wpf Dragdrop
The GongSolutions.WPF.DragDrop library is a drag'n'drop framework for WPF
Stars: ✭ 1,669 (+424.84%)
Mutual labels:  drag-and-drop, drag, drop
KanbanDragDropiOS
Kanban Board using Drag & Drop iOS API
Stars: ✭ 95 (-70.13%)
Mutual labels:  drag-and-drop, drag, drop
solid-dnd
A lightweight, performant, extensible drag and drop toolkit for Solid JS.
Stars: ✭ 251 (-21.07%)
Mutual labels:  drag-and-drop, drag, drop
DragDropiOS
DragDropiOS is a drag and drop manager on iOS. It supports drag and drop with in one or more classes extends UIView. This library contains UICollectionView and UITableView that implenment of drag and drop manager.
Stars: ✭ 71 (-77.67%)
Mutual labels:  drag-and-drop, drag, drop
DragPanel
A nice vertical drag layout, a bit like BottomSheet, but with strong customization!
Stars: ✭ 21 (-93.4%)
Mutual labels:  layout, panel, drag
vue-simple-upload-component
A simple upload component for Vue.js 2.x
Stars: ✭ 14 (-95.6%)
Mutual labels:  drag-and-drop, drag, drop
Vue Smooth Dnd
Vue wrapper components for smooth-dnd
Stars: ✭ 1,121 (+252.52%)
Mutual labels:  drag-and-drop, drag, drop
Angular Skyhook
An implementation of react-dnd for Angular.
Stars: ✭ 146 (-54.09%)
Mutual labels:  drag-and-drop, drag, drop
Ngx Smooth Dnd
angular wrapper for smooth-dnd
Stars: ✭ 152 (-52.2%)
Mutual labels:  drag-and-drop, drag, drop
DragDropUI
A set of iOS UI components which have drag & drop capability.
Stars: ✭ 30 (-90.57%)
Mutual labels:  drag, drop
mate-tweak
Tweak tool for the MATE Desktop
Stars: ✭ 57 (-82.08%)
Mutual labels:  layout, panel

Dock Layout for React Component

Popup panel as new browser window

Dark Theme

Usage

rc-tabs

import DockLayout from 'rc-dock'
import "rc-dock/dist/rc-dock.css";

...

defaultLayout = {
  dockbox: {
    mode: 'horizontal',
    children: [
      {
        tabs: [
          {id: 'tab1', title: 'tab1', content: <div>Hello World</div>}
        ]
      }
    ]
  }
};

render() {
  return (
    <DockLayout
      defaultLayout={defaultLayout}
      style={{
        position: "absolute",
        left: 10,
        top: 10,
        right: 10,
        bottom: 10,
      }}
    />
  )
}

types

LayoutData 🗎

Property Type Comments Default
dockbox BoxData main dock box empty BoxData
floatbox BoxData main float box, children can only be PanelData empty BoxData

BoxData 🗎

a box is the layout element that contains other boxes or panels

Property Type Comments Default
mode 'horizontal' | 'vertical' | 'float' layout mode of the box
children (BoxData | PanelData)[] children boxes or panels required

PanelData 🗎

a panel is a visiaul container with tabs button in the title bar

Property Type Comments Default
tabs TabData[] children tabs required
panelLock PanelLock addition information of a panel, this prevents the panel from being removed when there is no tab inside, a locked panel can not be moved to float layer either

TabData 🗎

Property Type Comments Default
id string unique id required
title string | ReactElement tab title required
content ReactElement | (tab: TabData) => ReactElement tab content required
closable bool whether tab can be closed false
group string tabs with different tab group can not be put in same panel, more options for the group can be defined as TabGroup in DefaultLayout.groups

DockLayout API

get the ref of the DockLayout component to use the following API

saveLayout 🗎

save layout

saveLayout(): SavedLayout 

loadLayout 🗎

load layout

 loadLayout(savedLayout: SavedLayout): void

dockMove 🗎

move a tab or a panel, if source is already in the layout, you can use the find method to get it with id first

dockMove(source: TabData | PanelData, target: string | TabData | PanelData | BoxData, direction: DropDirection): void;

find 🗎

find PanelData or TabData by id

find(id: string): PanelData | TabData;

updateTab 🗎

update a tab with new TabData

returns false if the tab is not found

updateTab(id: string, newTab: TabData): boolean;
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].