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.
@devbookhq/splitter
Advanced tools
Splitter is a React component that allows you to split views into resizable panels. Similar to tabs in Visual Studio Code, for example. Here's a gif of what you can build with Splitter:
Splitter is inspired by Split.js and written as 100% functional component:
calc
with minimal JS. This makes it much fasternpm install @devbookhq/splitter
# or
yarn add @devbookhq/splitter
import Splitter, { SplitDirection } from '@devbookhq/splitter'
function MyComponent() {
return (
<Splitter>
<div>Tile 1</div>
<div>Tile 2</div>
</Splitter>
);
}
import Splitter, { SplitDirection } from '@devbookhq/splitter'
function MyComponent() {
return (
<Splitter direction={SplitDirection.Vertical}>
<div>Tile 1</div>
<div>Tile 2</div>
</Splitter>
);
}
import Splitter, { SplitDirection } from '@devbookhq/splitter'
function MyComponent() {
return (
<Splitter direction={SplitDirection.Vertical}>
<div>Tile 1</div>
<Splitter direction={SplitDirection.Horizontal}>
<div>Tile 2</div>
<Splitter direction={SplitDirection.Vertical}>
<div>Tile 3</div>
<div>Tile 4</div>
</Splitter>
</Splitter>
</Splitter>
);
}
import Splitter, { SplitDirection } from '@devbookhq/splitter'
function MyComponent() {
function handleResizeStarted(gutterIdx: number) {
console.log('Resize started!', gutterIdx);
}
function handleResizeFinished(gutterIdx: number, newSizes: number[]) {
console.log('Resize finished!', gutterIdx, newSizes);
}
return (
<Splitter
direction={SplitDirection.Vertical}
onResizeStarted={handleResizeStarted}
onResizeFinished={handleResizeFinished}
>
<div>Tile 1</div>
<div>Tile 2</div>
</Splitter>
);
}
To see more examples check out the examples section.
Check the example
folder or the CodeSandbox project.
FAQs
Create resizable split views - like in VS Code
We found that @devbookhq/splitter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.