Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Zero dependency layout manager supporting tabs, grids and splitviews with ReactJS support
Zero dependency layout manager supporting tabs, grids and splitviews with ReactJS support
A zero dependency layout manager based on the layering of split-view components with ReactJS support. View the live demo here. Automatically generated TypeDocs can be found here.
You can install the project from npm. The project comes with TypeScript typings.
npm install --save dockview
You must import the core css stylesheet but you are free to supply your own theming in addition to the core stylesheet. The location to reference for the stylesheet is
dockview/dist/styles.css
By default the seperator between panels is transparent
but this can be set through the CSS varibable --separator-border
. Alternatively, or if you require the DockviewReact
you should attach the classname of an included theme; either dockview-theme-dark
or dockview-theme-light
.
dockview has a peer dependency on react >= 16.8.0
and react-dom >= 16.8.0
which is the version that introduces React Hooks.
import {
ISplitviewPanelProps,
Orientation,
SplitviewReact,
SplitviewReadyEvent
} from "dockview";
const components = {
"my-component": (props: ISplitviewPanelProps) => {
return (
<div>
<span>This is a panel</span>
<span>{props.arbitraryProp}</span>
</div>
)
}
}
const Example = () => {
const onReady = (event: SplitviewReadyEvent) => {
event.addPanel({
id: "panel-1",
component: "my-component",
params: {
arbitraryProp: "Hello World"
}
});
event.addPanel({
id: "panel-2",
component: "my-component",
params: {
arbitraryProp: "World Hello"
}
});
}
return (
<SplitviewReact
components={components}
onReady={onReady}
orientation={Orientation.VERTICAL}
/>
)
}
FAQs
Zero dependency layout manager supporting tabs, grids and splitviews
The npm package dockview receives a total of 3,829 weekly downloads. As such, dockview popularity was classified as popular.
We found that dockview demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.