Gathering detailed insights and metrics for rc-dock
Gathering detailed insights and metrics for rc-dock
Gathering detailed insights and metrics for rc-dock
Gathering detailed insights and metrics for rc-dock
npm install rc-dock
Typescript
Module System
Node Version
NPM Version
85.9
Supply Chain
94.4
Quality
83.4
Maintenance
100
Vulnerability
99.3
License
JavaScript (65.27%)
TypeScript (27.69%)
Less (3.74%)
HTML (2.81%)
CSS (0.49%)
Total Downloads
890,580
Last Day
868
Last Week
7,576
Last Month
28,954
Last Year
331,757
Apache-2.0 License
753 Stars
611 Commits
101 Forks
11 Watchers
4 Branches
14 Contributors
Updated on Jun 27, 2025
Minified
Minified + Gzipped
Latest Version
3.3.2
Package Id
rc-dock@3.3.2
Unpacked Size
570.79 kB
Size
84.00 kB
File Count
131
NPM Version
10.9.0
Node Version
22.11.0
Published on
May 18, 2025
Cumulative downloads
Total Downloads
Last Day
74.3%
868
Compared to previous day
Last Week
10.9%
7,576
Compared to previous week
Last Month
14%
28,954
Compared to previous month
Last Year
14.3%
331,757
Compared to previous year
23
1import DockLayout from 'rc-dock' 2import "rc-dock/dist/rc-dock.css"; 3 4... 5 6defaultLayout = { 7 dockbox: { 8 mode: 'horizontal', 9 children: [ 10 { 11 tabs: [ 12 {id: 'tab1', title: 'tab1', content: <div>Hello World</div>} 13 ] 14 } 15 ] 16 } 17}; 18 19render() { 20 return ( 21 <DockLayout 22 defaultLayout={defaultLayout} 23 style={{ 24 position: "absolute", 25 left: 10, 26 top: 10, 27 right: 10, 28 bottom: 10, 29 }} 30 /> 31 ) 32} 33
Property | Type | Comments | Default |
---|---|---|---|
dockbox | BoxData | main dock box | empty BoxData |
floatbox | BoxData | main float box, children can only be PanelData | empty 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 |
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 |
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 |
get the ref
of the DockLayout component to use the following API
save layout
1saveLayout(): SavedLayout
load layout
1 loadLayout(savedLayout: SavedLayout): void
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
1dockMove(source: TabData | PanelData, target: string | TabData | PanelData | BoxData, direction: DropDirection): void;
find PanelData or TabData by id
1find(id: string | ((item: PanelData | TabData | BoxData) => boolean), filter?: Filter): PanelData | TabData | BoxData | undefined;
update a tab with new TabData
returns false if the tab is not found
1updateTab(id: string, newTab: TabData): boolean;
No vulnerabilities found.
Reason
15 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 5/18 approved changesets -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
28 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More