• This repository has been archived on 18/Aug/2020
  • Stars
    star
    544
  • Rank 81,699 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Resizable dockable react component

🏚

This package was merged into redux-devtools monorepo. Please refer to that repository for the latest updates, issues and pull requests.

react-dock

Resizable dockable react component.

Demo

http://alexkuz.github.io/react-dock/demo/

Install

$ npm i -S react-dock

Example

render() {
  return (
    <Dock position='right' isVisible={this.state.isVisible}>
      {/* you can pass a function as a child here */}
      <div onClick={() => this.setState({ isVisible: !this.state.isVisible })}>X</div>
    </Dock>
  );
}

Dock Props

Prop Name Description
position Side to dock (left, right, top or bottom). Default is left.
fluid If true, resize dock proportionally on window resize.
size Size of dock panel (width or height, depending on position). If this prop is set, Dock is considered as a controlled component, so you need to use onSizeChange to track dock resizing. Value is a fraction of window width/height, if fluid is true, or pixels otherwise
defaultSize Default size of dock panel (used for uncontrolled Dock component)
isVisible If true, dock is visible
dimMode If none - content is not dimmed, if transparent - pointer events are disabled (so you can click through it), if opaque - click on dim area closes the dock. Default is opaque
duration Animation duration. Should be synced with transition animation in style properties
dimStyle Style for dim area
dockStyle Style for dock
zIndex Z-index for wrapper
onVisibleChange Fires when Dock wants to change isVisible (when opaque dim is clicked, in particular)
onSizeChange Fires when Dock wants to change size
children Dock content - react elements or function that returns an element. Function receives an object with these state values: { position, isResizing, size, isVisible }

More Repositories

1

react-input-enhancements

Set of enhancements for input control
JavaScript
1,376
star
2

react-json-tree

React JSON Viewer Component, Extracted from redux-devtools
JavaScript
992
star
3

webpack-chart

Webpack Chart
JavaScript
437
star
4

cake-chart

Interactive multi-layer pie chart
JavaScript
426
star
5

flask-react-boilerplate

JavaScript
368
star
6

redux-devtools-inspector

Another Redux DevTools Monitor
JavaScript
240
star
7

script-progress

Estimate script execution time
JavaScript
177
star
8

nyan-progress-webpack-plugin

Meow
JavaScript
172
star
9

markdown-react-js

Markdown to React Component converter
JavaScript
104
star
10

stellar-webpack

A little experiment
JavaScript
92
star
11

redux-pagan

managing internationalization via redux
JavaScript
78
star
12

restore-source-tree

Restores file structure from source map
JavaScript
62
star
13

additive-animation

Additive animation npm module
JavaScript
46
star
14

react-transform-debug-inspector

React inspector tranformation function for babel-plugin-wrap-react-components
JavaScript
29
star
15

react-base16-styling

React styling with base16 color scheme support
JavaScript
21
star
16

export-files-webpack-plugin

Exports files to FS (even in devserver mode)
JavaScript
17
star
17

SublimeLinter-inline-errors

Shows linting errors inline with Phantom API
Python
15
star
18

react-bootstrap-breadcrumbs

Breadcrumbs for React-Router and Bootstrap
JavaScript
15
star
19

react-pagan

JavaScript
14
star
20

jss-css

JavaScript
14
star
21

Tomato

Pebble pomodoro app
C
7
star
22

pg_unidecode

Postgres Unidecode extension
C
7
star
23

git-swap

Interactive, pure-shell menu for switching between git branches
Shell
5
star
24

sublime-bun

Bun binary files viewer and other Bun-related stuff
Python
5
star
25

sublime-yarn-lock

Syntax highlighting for yarn.lock and bun.lockb files
4
star
26

shittify-js

So you can honestly say your code is full of shit
JavaScript
4
star
27

babel-plugin-jss-css

JavaScript
4
star
28

svg-flag-editor

Online tool for editing flag svg image source
JavaScript
2
star
29

react-component-boilerplate

React component template
JavaScript
2
star
30

tslint-no-commented-code-rule

TSLint rule that bans commented code
TypeScript
2
star
31

sqlalchemy-flux-serializer

Serialize sqlalchemy models into flux-friendly json
Python
2
star
32

nodejs-dashboard-layout-progress

Layout for nodejs-dashboard with progress and status
JavaScript
2
star
33

alexkuz

HTML
2
star
34

eslint-plugin-jinja

This plugin treats Jinja template expressions as Javascript literals and ignores template statements and comments
JavaScript
2
star
35

mono-coffeescript-addin

CoffeeScript language addin for MonoDevelop
C#
1
star
36

custom-stickers

Python
1
star
37

SublimeLinter-contrib-zig-check

SublimeLinter plugin for Zig built-in linter (zig ast-check)
Python
1
star
38

alexkuz.github.io

HTML
1
star
39

bun-playground

Test repo to reproduce bun errors
TypeScript
1
star
40

python-rust-dprint

JavaScript
1
star
41

wds-ws-proxy-example

JavaScript
1
star
42

next-netlify-starter

JavaScript
1
star
43

nextjs-netlify-blog-template

TypeScript
1
star
44

shell-menu

Shell function for interactive menu
Shell
1
star
45

promisegate

Limits promise concurrency
JavaScript
1
star
46

micro-flag-icons

Collection of minimal country flag svg images
HTML
1
star