Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dockview

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dockview

dockview

  • 0.0.0-beta.14
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.9K
decreased by-16.01%
Maintainers
1
Weekly downloads
 
Created
Source

dockview

zero dependency layout manager and split views with ReactJS support


stability-experimental npm version CI Build codecov

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.

Installation

You can install the project from npm. The project comes with TypeScript typings.

npm install --save dockview

Configuration

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 DockviewComponent you should attach the classname of an included theme; either dockview-theme-dark or dockview-theme-light.

Online examples

Splitview

React

Splitview

import { 
    ISplitviewPanelProps, 
    Orientation, 
    SplitviewComponent,
    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 (
        <SplitviewComponent
            components={components}
            onReady={onReady}
            orientation={Orientation.VERTICAL}
        />
    )
}

Run the demo locally

Keywords

FAQs

Package last updated on 14 Nov 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc