
Security News
Static vs. Runtime Reachability: Insights from Latio’s On the Record Podcast
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
split-pane-react-test
Advanced tools
# use npm
npm install split-pane-react
# or if you use yarn
yarn add split-pane-react
import SplitPane, { Pane } from 'split-pane-react';
import 'split-pane-react/esm/themes/default.css'
function Basic () {
const [sizes, setSizes] = useState([
100,
'30%',
'auto',
]);
const layoutCSS = {
height: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
};
return (
<div style={{ height: 500 }}>
<SplitPane
split='vertical'
sizes={sizes}
onChange={setSizes}
>
<Pane minSize={50} maxSize='50%'>
<div style={{ ...layoutCSS, background: '#ddd' }}>
pane1
</div>
</Pane>
<div style={{ ...layoutCSS, background: '#d5d7d9' }}>
pane2
</div>
<div style={{ ...layoutCSS, background: '#a1a5a9' }}>
pane2
</div>
</SplitPane>
</div>
);
};
** SplitPane **
Property | Description | Type | Default |
---|---|---|---|
split | Determine layout of panes. | 'vertical' |'horizontal' | 'vertical' |
sizes | Collection of different panel sizes,Only support controlled mode, so it's required | (string | number)[] | [] |
resizerSize | Specify the size for resizer | number | 4 |
allowResize | Should allowed to resized | boolean | true |
className | split pane custom class name | string | void |
sashClassName | split sash custom class name | string | void |
paneClassName | split pane custom class name | string | void |
onChange | Callback of size change | (sizes: number[]) => void | void |
** Pane **
Property | Description | Type | Default |
---|---|---|---|
className | pane class name | string | void |
minSize | Limit the minimum size of the panel | string | number | void |
maxSize | Limit the maximum size of this panel | string|number | void |
Three different theme styles are built into this component:
import 'split-pane-react/esm/themes/default.css';
import 'split-pane-react/esm/themes/theme1.css';
import 'split-pane-react/esm/themes/theme2.css';
split-pane-react licensed under MIT.
PS: I would love to know if you're using split-pane-react. If you have any use problems, you can raise the issue, and I will try my best to solve them.
FAQs
Resizable split panes for React.js.
The npm package split-pane-react-test receives a total of 0 weekly downloads. As such, split-pane-react-test popularity was classified as not popular.
We found that split-pane-react-test demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.