
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@1ohooks/swipeable
Advanced tools
[](https://www.npmjs.org/package/@1ohooks/swipeable) [](https://coveralls.io/github/1ohooks/swipe
The @1ohooks/swipeable
package provides hooks for handling swipe gestures in React applications.
Install the package with:
npm install @1ohooks/swipeable
# or
yarn add @1ohooks/swipeable
The useHorizontalSwipeMinimum
hook allows you to detect horizontal swipe gestures.
import { useHorizontalSwipeMinimum } from '@1ohooks/swipeable';
// Usage example
function MyComponent() {
useHorizontalSwipeMinimum(50, () => {
// Handle swipe left
}, () => {
// Handle swipe right
});
return (
// Your component JSX
);
}
The useVerticalSwipeMinimum
hook allows you to detect vertical swipe gestures.
import { useVerticalSwipeMinimum } from '@1ohooks/swipeable';
// Usage example
function MyComponent() {
useVerticalSwipeMinimum(50, () => {
// Handle swipe up
}, () => {
// Handle swipe down
});
return (
// Your component JSX
);
}
The useSwipe
hook provides a more versatile way to handle swipe gestures with customizable options.
import { useSwipe } from '@1ohooks/swipeable';
// Usage example
function MyComponent() {
const { swipeDistance } = useSwipe({
threshold: 50,
onSwipeLeft: () => {
// Handle swipe left
},
onSwipeRight: () => {
// Handle swipe right
},
// Additional configuration options
});
return (
// Your component JSX
);
}
You can easily integrate the swipe gestures into your React components by importing and using the provided hooks.
For more advanced usage and configuration options, refer to the individual hook documentation.
FAQs
[](https://www.npmjs.org/package/@1ohooks/swipeable) [](https://coveralls.io/github/1ohooks/swipe
The npm package @1ohooks/swipeable receives a total of 0 weekly downloads. As such, @1ohooks/swipeable popularity was classified as not popular.
We found that @1ohooks/swipeable 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.