React split-pane component

Overview

React Split Pane

NPM version NPM license NPM total downloads NPM monthly downloads Build Test Coverage Status

Split-Pane React component, can be nested or split vertically or horizontally!

Installing

npm install react-split-pane

# or if you use yarn

yarn add react-split-pane

## Example Usage

```jsx
<SplitPane split="vertical" minSize={50} defaultSize={100}>
  <div />
  <div />
</SplitPane>
<SplitPane split="vertical" minSize={50}>
  <div />
  <SplitPane split="horizontal">
    <div />
    <div />
  </SplitPane>
</SplitPane>

Props

primary

By dragging 'draggable' surface you can change size of the first pane. The first pane keeps then its size while the second pane is resized by browser window. By default it is the left pane for 'vertical' SplitPane and the top pane for 'horizontal' SplitPane. If you want to keep size of the second pane and let the first pane to shrink or grow by browser window dimensions, set SplitPane prop primary to second. In case of 'horizontal' SplitPane the height of bottom pane remains the same.

Resizing can be disabled by passing the allowResize prop as false (allowResize={false}). Resizing is enabled by default.

You can also set the size of the pane using the size prop. Note that a size set through props ignores the defaultSize and minSize properties.

In this example right pane keeps its width 200px while user is resizing browser window.

<SplitPane split="vertical" defaultSize={200} primary="second">
  <div />
  <div />
</SplitPane>

maxSize

You can limit the maximal size of the 'fixed' pane using the maxSize parameter with a positive value (measured in pixels but state just a number). If you wrap the SplitPane into a container component (yes you can, just remember the container has to have the relative or absolute positioning), then you'll need to limit the movement of the splitter (resizer) at the end of the SplitPane (otherwise it can be dragged outside the SplitPane and you don't catch it never more). For this purpose use the maxSize parameter with value 0. When dragged the splitter/resizer will stop at the border of the SplitPane component and think this you'll be able to pick it again and drag it back then. And more: if you set the maxSize to negative value (e.g. -200), then the splitter stops 200px before the border (in other words it sets the minimal size of the 'resizable' pane in this case). This can be useful also in the full-screen case of use.

step

You can use the step prop to only allow resizing in fixed increments.

onDragStarted

This callback is invoked when a drag starts.

onDragFinished

This callback is invoked when a drag ends.

onChange

This callback is invoked with the current drag during a drag event. It is recommended that it is wrapped in a debounce function.

Inline Styles

You can also pass inline styles to the components via props. These are:

  • style - Styling to be applied to the main container.
  • paneStyle - Styling to be applied to both panes
  • pane1Style - Styling to be applied to the first pane, with precedence over paneStyle
  • pane2Style - Styling to be applied to the second pane, with precedence over paneStyle
  • resizerStyle - Styling to be applied to the resizer bar

Persisting Positions

Each SplitPane accepts an onChange function prop. Used in conjunction with defaultSize and a persistence layer, you can ensure that your splitter choices survive a refresh of your app.

For example, if you are comfortable with the trade-offs of localStorage, you could do something like the following:

<SplitPane
  split="vertical"
  minSize={50}
  defaultSize={parseInt(localStorage.getItem('splitPos'), 10)}
  onChange={(size) => localStorage.setItem('splitPos', size)}
>
  <div />
  <div />
</SplitPane>

Disclaimer: localStorage has a variety of performance trade-offs. Browsers such as Firefox have now optimized localStorage use so that they will asynchronously initiate a read of all saved localStorage data for an origin once they know the page will load. If the data has not fully loaded by the time code accesses localStorage, the code will cause the page's main thread to block until the database load completes. When the main thread is blocked, no other JS code will run or layout will occur. In multiprocess browsers and for users with fast disk storage, this will be less of a problem. You are likely to get yelled at if you use localStorage.

A potentially better idea is to use something like https://github.com/mozilla/localForage although hooking it up will be slightly more involved. You are likely to be admired by all for judiciously avoiding use of localStorage.

Example styling

This gives a single pixel wide divider, but with a 'grabbable' surface of 11 pixels.

Thanks to background-clip: padding-box; for making transparent borders possible.

.Resizer {
  background: #000;
  opacity: 0.2;
  z-index: 1;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -moz-background-clip: padding;
  -webkit-background-clip: padding;
  background-clip: padding-box;
}

.Resizer:hover {
  -webkit-transition: all 2s ease;
  transition: all 2s ease;
}

.Resizer.horizontal {
  height: 11px;
  margin: -5px 0;
  border-top: 5px solid rgba(255, 255, 255, 0);
  border-bottom: 5px solid rgba(255, 255, 255, 0);
  cursor: row-resize;
  width: 100%;
}

.Resizer.horizontal:hover {
  border-top: 5px solid rgba(0, 0, 0, 0.5);
  border-bottom: 5px solid rgba(0, 0, 0, 0.5);
}

.Resizer.vertical {
  width: 11px;
  margin: 0 -5px;
  border-left: 5px solid rgba(255, 255, 255, 0);
  border-right: 5px solid rgba(255, 255, 255, 0);
  cursor: col-resize;
}

.Resizer.vertical:hover {
  border-left: 5px solid rgba(0, 0, 0, 0.5);
  border-right: 5px solid rgba(0, 0, 0, 0.5);
}
.Resizer.disabled {
  cursor: not-allowed;
}
.Resizer.disabled:hover {
  border-color: transparent;
}

New Version

I'm working on an updated version of this library, and looking for help:

Demo

http://react-split-pane-v2.surge.sh/

Install

npm install [email protected]

# or if you use yarn

yarn add [email protected]

Usage

import SplitPane, { Pane } from 'react-split-pane';

<SplitPane split="vertical">
  <Pane initialSize="200px">You can use a Pane component</Pane>
  <div>or you can use a plain old div</div>
  <Pane initialSize="25%" minSize="10%" maxSize="500px">
    Using a Pane allows you to specify any constraints directly
  </Pane>
</SplitPane>;

Pull request

https://github.com/tomkp/react-split-pane/pull/240

More discussion

https://github.com/tomkp/react-split-pane/issues/233

Contributing

I'm always happy to receive Pull Requests for contributions of any kind.

Please include tests and/or update the examples if possible.

Thanks, Tom

Comments
  • Stopped working after 0.1.77

    Stopped working after 0.1.77

    Today I upgraded from 0.1.77 to latest 0.1.81 and the component just stopped working. It installs and imports fine, but the slider won't drag anymore.

    I tried looking for a changelog or some new documentation, but couldn't find any. Were there any breaking changes introduced since February? Here's how I'm using the SplitPane.

    function ResizablePanels({
      resizing,
      panelSize,
      onDragStarted,
      onDragFinished,
      onResizerDoubleClick,
      children
    }) {
      return (
        <SplitPane
          className={cn({
            'disable-pointer-events': resizing
          })}
          split="horizontal"
          defaultSize="65vh"
          size={panelSize}
          maxSize={-15}
          onDragStarted={onDragStarted}
          onDragFinished={onDragFinished}
          onResizerDoubleClick={onResizerDoubleClick}
        >
          {children[0]}
          {children[1]}
        </SplitPane>
      );
    }
    

    I can see the callbacks being called before and after drag, but the panel doesn't resize.

    Reverting back to 0.1.77 works for now.

    bug 
    opened by nfantone 13
  • type declaration - fix missing `children` prop

    type declaration - fix missing `children` prop

    React 18's types are more strict and the missing children prop results in this typescript error being thrown when using the component

    Type '{ children: Element[]; css: SerializedStyles; split: "vertical"; minSize: number; maxSize: number; onDragStarted: () => void; onDragFinished: (newSize: number) => void; size: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<SplitPane> & { css?: Interpolation<Theme>; } & Pick<...> & InexactPartial<...> & InexactPartial<...>'.
      Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<SplitPane> & { css?: Interpolation<Theme>; } & Pick<...> & InexactPartial<...> & InexactPartial<...>'.ts(2322)
    

    (anyone else running into this can use patch-package to modify node_modules/react-split-pane/index.d.ts in the meantime)

    opened by ellanan 10
  • Fixed: Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

    Fixed: Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

    https://github.com/ExpeditionRPG/expedition/blob/master/services/quests/src/components/Main.tsx#L83

    Fails even when simplified to:

    <SplitPane>
      <div>Foo</div>
    </SplitPane>
    

    We're already on React 16 and Webpack 4, so not sure what else it could be... any ideas? Any other information I can provide or places I can look to debug this?

    Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
    
    Check the render method of `Main`.
        at invariant (invariant.js:42)
        at getFiberTagFromObjectType (react-dom.development.js:9766)
        at createFiberFromElement (react-dom.development.js:9726)
        at reconcileSingleElement (react-dom.development.js:12587)
        at reconcileChildFibers (react-dom.development.js:12644)
        at reconcileChildrenAtExpirationTime (react-dom.development.js:13023)
        at reconcileChildren (react-dom.development.js:13006)
        at updateHostComponent (react-dom.development.js:13340)
        at beginWork (react-dom.development.js:13828)
        at performUnitOfWork (react-dom.development.js:15863)
        at workLoop (react-dom.development.js:15902)
        at HTMLUnknownElement.callCallback (react-dom.development.js:100)
        at Object.invokeGuardedCallbackDev (react-dom.development.js:138)
        at invokeGuardedCallback (react-dom.development.js:187)
        at replayUnitOfWork (react-dom.development.js:15310)
        at renderRoot (react-dom.development.js:15962)
        at performWorkOnRoot (react-dom.development.js:16560)
        at performWork (react-dom.development.js:16482)
        at performSyncWork (react-dom.development.js:16454)
        at interactiveUpdates$1 (react-dom.development.js:16719)
        at interactiveUpdates (react-dom.development.js:2150)
        at dispatchInteractiveEvent (react-dom.development.js:4532)
    
    bug: unconfirmed 
    opened by toddmedema 10
  • "too much recursion" after introduction of fast-deep-equal

    After update to 0.1.72 we get "too much recursion" on equal() call. The error seems pretty random, e.g. we add a line to package.json for jest configuration and then we remove it, and one of the webpack builds exhibits the problem, and the other doesn't (while the line is unrelated to the build).

    We pass only very basic props to SplitPane (no deeply nested, recursive structures). children of SplitPane contain one redux-connected component (but a simple one, too).

    too much recursion[Learn More] index.js:4
    "The above error occurred in the <Pane> component:
    in Pane (created by SplitPane)
    in div (created by SplitPane)
    in SplitPane (created by SplitPaneView)
    in div (created by SplitPaneView)
    in SplitPaneView (created by Connect(SplitPaneView))
    in Connect(SplitPaneView) (created by X)
    in div (created by X)
    in X (created by App)
    in Y (created by Connect(Y))
    in Connect(Y) (created by App)
    in Z (created by Connect(Z))
    in Connect(Z) (created by App)
    in div (created by App)
    in App (created by Root)
    in Provider (created by Root)
    in Root
    

    Browser: Firefox 57.0.1 (64-bit)

    As a side note: it would be really helpful if the repo was tagged for releases.

    opened by atzec 10
  • Not work (Can not resize)

    Not work (Can not resize)

    I use project created by create-react-app and replace src/index.js as follow:

    import React from 'react';
    import ReactDOM from 'react-dom';
    import SplitPane from 'react-split-pane';
    
    ReactDOM.render(
      <SplitPane split="vertical" minSize={50} defaultSize={100}>
        <div style={{background: 'red', height: window.innerHeight}}></div>
        <div></div>
       </SplitPane>, document.getElementById('root'));
    

    And then npm start. I can see the panel but can not resize it.

    opened by lucklove 10
  • Changing size dynamically doesn't work in strict mode

    Changing size dynamically doesn't work in strict mode

    Describe the bug

    Dynamically changing the size has no effect in React strict mode, either programatically or via devtools.

    To Reproduce

    Steps to reproduce the behavior:

    1. Go to https://codesandbox.io/s/048norw86p
    2. Open the preview window fullscreen
    3. Open React devtools
    4. Change the size prop to some other value
    5. Notice nothing happens

    Expected behavior

    Changing the size prop should change the size of the fixed pane.

    Additional context

    As the getDerivedStateFromProps function is state dependent (it state based on the previous state), in React's strict mode it gets tripped by this sort-of zany check:

    https://github.com/facebook/react/blob/067cc24f55ef01a233be9e7564b337e35fed72ea/packages/react-reconciler/src/ReactFiberClassComponent.js#L139-L148

    So when you change props, getDerivedStateFromProps gets called twice and the second time, this check returns false, so newState.paneXsize is not set:

    https://github.com/tomkp/react-split-pane/blob/ec8d4ae90c9dc6d4eb1a941c2da59b80c22c65f6/src/SplitPane.js#L235-L238

    I could have this explanation wrong, I'll admit it's pretty confusing.

    bug help wanted 
    opened by tmeasday 8
  • Persist size units after resizing

    Persist size units after resizing

    This PR allows the user to set initial size in px / % / ratio (by default 1). When you resize the window or pane size units persist their initial value, so px stays px, % stays %, ratio stays ratio.

    v2 
    opened by walerun 8
  • Set draggedSize when props.size changes

    Set draggedSize when props.size changes

    I have a use case similar to https://github.com/tomkp/react-split-pane/issues/84, but slightly different.

    I want to make a pane that can "snap" into position when the user drags the divider to within a certain width range. I can do this by setting the size prop when the drag ends. But, I also want the pane to be able to be dragged by the user once more, so I have a setTimeout to reset size to undefined.

    That's all well and good, except that when the size prop is unset, the pane jumps back to the position where the user stopped dragging. In other words, the size is not persisted.

    This PR is a small change which sets the SplitPane draggedSize state whenever the size prop changes.

    I'd be happy to hear any thoughts you have on other methods to add "snapping" functionality, but this seems to be working for my particular case.

    opened by IanVS 8
  • Added eslint based on airbnb config

    Added eslint based on airbnb config

    I understand that linting is a personal thing but I think that even with the base airbnb config and modified indentation it catches a lot of style inconsistencies.

    And it is definitely better than not to have any linter at all.

    What do you think?

    opened by zerkms 8
  • Doesn't work well with iframes

    Doesn't work well with iframes

    If I try to embed iframes in the split panes the dragging doesnt work very well. As soon as the mouse enters the iframe it stops dragging. Is there any way to fix this?

    Regards

    opened by ngerritsen 8
  • feat: Support the CSS order property

    feat: Support the CSS order property

    Currently, if the ordering of the flex items is altered via the CSS order property so that the two panes are reversed, the sizing happens in the wrong direction i.e. dragging left should make the pane bigger, but it makes it smaller. This simply looks up and compares the two order values for each pane and inverts the sizeDelta to take this into account.

    Use case: I have an iframe within a SplitPane that I need to ensure stays mounted at all times, so reversing the children is not an option.

    opened by Craga89 7
  • chore(deps): bump json5 from 1.0.1 to 1.0.2

    chore(deps): bump json5 from 1.0.1 to 1.0.2

    Bumps json5 from 1.0.1 to 1.0.2.

    Release notes

    Sourced from json5's releases.

    v1.0.2

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295). This has been backported to v1. (#298)
    Changelog

    Sourced from json5's changelog.

    Unreleased [code, diff]

    v2.2.3 [code, diff]

    v2.2.2 [code, diff]

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1 [code, diff]

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0 [code, diff]

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)

    v2.1.2 [code, diff]

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump express from 4.17.1 to 4.18.2

    chore(deps): bump express from 4.17.1 to 4.18.2

    Bumps express from 4.17.1 to 4.18.2.

    Release notes

    Sourced from express's releases.

    4.18.2

    4.18.1

    • Fix hanging on large stack of sync routes

    4.18.0

    ... (truncated)

    Changelog

    Sourced from express's changelog.

    4.18.2 / 2022-10-08

    4.18.1 / 2022-04-29

    • Fix hanging on large stack of sync routes

    4.18.0 / 2022-04-25

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump qs from 6.5.2 to 6.5.3

    chore(deps): bump qs from 6.5.2 to 6.5.3

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2

    chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Upgrade dependencies and fix peerDependencies

    Upgrade dependencies and fix peerDependencies

    This PR upgrade all dependencies to the latest version and fixes issues with outdated peerDependencies.

    All React dependencies are now set to version >= 16.

    opened by zirkelc 0
  • Type Error (React 18.2.0)

    Type Error (React 18.2.0)

    Hi! 👋

    Firstly, thanks for your work on this project! 🙂

    Today I used patch-package to patch [email protected] for the project I'm working on.

    I got the following error:

    Type error: Type '{ children: Element[]; split: "vertical"; minSize: number; defaultSize: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<SplitPane> & Pick<Readonly<SplitPaneProps>, never> & InexactPartial<...> & InexactPartial<...>'.
      Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<SplitPane> & Pick<Readonly<SplitPaneProps>, never> & InexactPartial<...> & InexactPartial<...>'.
    
       7 | const Home: NextPage = () => {
       8 |   return (
    >  9 |     <SplitPane split='vertical' minSize={50} defaultSize={100}>
         |      ^
      10 |       <div />
      11 |       <div />
      12 |     </SplitPane>
    

    Here is the diff that solved my problem:

    diff --git a/node_modules/react-split-pane/index.d.ts b/node_modules/react-split-pane/index.d.ts
    index d116f54..3c7eb24 100644
    --- a/node_modules/react-split-pane/index.d.ts
    +++ b/node_modules/react-split-pane/index.d.ts
    @@ -5,6 +5,7 @@ export type Size = string | number;
     export type Split = 'vertical' | 'horizontal';
     
     export type SplitPaneProps = {
    +  children: React.ReactNode[],
       allowResize?: boolean;
       className?: string;
       primary?: 'first' | 'second';
    

    This issue body was partially generated by patch-package.

    opened by lewismazzei 5
Releases(v0.1.92)
React Arts is a library of react functional component which provides canvas sketch board in the app.

?? React Arts React Arts is a library of react functional component which provides canvas sketch board in the app. This library contains two react com

Satyam Lohiya 1 Jun 4, 2022
React component to blur image backgrounds using canvas.

React Blur React component for creating blurred backgrounds using canvas. Live demo Installation npm install react-blur --save Usage var Blur = requir

Javier Bórquez 439 Sep 27, 2022
📑 A React component to easily create demos of other components

React DemoTab ?? A React component to easily create demos of other components Install npm install react-demo-tab Demo DemoTab example Example import R

mkosir 31 Aug 20, 2022
A React component to view a PDF document

React PDF viewer A React component to view a PDF document. It's written in TypeScript, and powered by React hooks completely. // Core viewer import {

React PDF Viewer 1.4k Jan 9, 2023
React file input component for complete control over styling and abstraction from file reading.

react-file-reader-input React file input component for complete control over styling and abstraction from file reading. <FileReaderInput as={dataForma

Kevin Ngo 114 Nov 17, 2022
The react UI component for building complex filter criteria

React Filter Control The React component for building the composite filter criteria Demo (JS) | Demo (TS) Together With Data Table Overview Installati

Alexander Komarov 34 Dec 22, 2022
React JSON Viewer Component, Extracted from redux-devtools

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

Alexander Kuznetsov 992 Dec 24, 2022
🖱 A resizable and draggable component for React.

A resizable and draggable component for React. Table of Contents Screenshot Live Demo Storybook CodeSandbox Install Usage Props Instance API updateSiz

bokuweb 3.1k Jan 2, 2023
📏 A resizable component for React.

?? A resizable component for React. Table of Contents Screenshot Live Demo Storybook CodeSandbox Install Usage Props Instance API updateSize(size: { w

bokuweb 1.9k Jan 1, 2023
A simple React component to reproduce the way iOS deletes an item in a list

react-swipe-to-delete-ios A simple React component to reproduce the way iOS deletes an item in a list. Demo Installation yarn add react-swipe-to-delet

Arnaud Ambroselli 32 Oct 1, 2022
🎯 React component for transportation of modals, lightboxes, loading bars... to document.body or else.

React-portal Struggling with modals, lightboxes or loading bars in React? React-portal creates a new top-level React tree and injects its children int

Vojtech Miksu 2.1k Jan 3, 2023
Simple declarative and universal A/B testing component for React.

react-ab Simple declarative and universal A/B testing component for React. Demo Install npm install react-ab --save or bower install react-ab --save E

Ola 433 Nov 13, 2022
Elegant, accessible search component for React.

Elegant, accessible search component for React with recent searches & current location functionality. Installation npm i react-find --save Usage impo

George B. 20 Aug 19, 2022
Augmented reality using React component

React example with MindAR AR project using React and MindAR The react component is inside src/MindARViewer. Everything else are created from create-re

BigStar Dev 4 Jun 11, 2021
Recipe Card component with React

Recipe Card In this project I created the card to display for each dish on a recipe website. The Card Component in the project shows the details of a

Efecan Pınar 10 Jan 31, 2022
A React component that can virtualise lists and any set of children.

A list virtualiser that can create virtual rows out of arrays or a total count, or virtualise an arbitrary set of React components.

Mike Talbot 21 Sep 13, 2022
DataCamp's Design System and React component library.

DataCamp's Design System and React component library.

DataCamp 10 Oct 17, 2022
Simple multiline ellipsis component for React.JS

react-lines-ellipsis Poor man's multiline ellipsis component for React.JS https://xiaody.github.io/react-lines-ellipsis/ Installation To install the s

xiaody 523 Jan 4, 2023
😎 Check if your react component are visible on the screen without pain and with performance in mind

React on screen ?? Check if your react component are visible on the screen without pain and with performance in mind ?? ! React on screen Demo Install

Fadi Khadra 400 Nov 13, 2022