Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
swiper-action
Advanced tools
Simple react component for swipe-to-action.
This project is still in its early stages. If you have ideas for improvements, open an issue or a pull request!
You can install this package using your favorite package manager:
npm install swiper-action
There are two components:
SwiperAction
: acts as the outer container for your content.Action
: used for the definition of your "swipe-to-actions" actions. The handler for each action receives an InteractionEvent
that can either be a MouseEvent
or a TouchEvent
.import { SwiperAction, Action } from "swiper-action";
function Example() {
const actions = [
<Action action={(e) => handleClick(e)} key={1}>
<div className="flex h-full flex-col justify-center">
action
</div>
</Action>,
<Action action={(e) => handleClick(e)} key={2}>
<div className="flex h-full flex-col justify-center">
action2
</div>
</Action>,
];
return (
<SwiperAction actions={actions}>
<div>Content</div>
</SwiperAction>
);
}
In the end, this should look something like this image:
key
prop needs to be set manually for the Action
component. This will likely be fixed in the future.SwiperAction
component need to be set explicitly.This project is just getting started. Hence, feel free to open issues and pull requests!
FAQs
simple component for swipe-to-action
We found that swiper-action 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.