Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
react-swipe-to-delete-component
Advanced tools
A simple React component implement 'swipe to delete' UI-pattern.
A simple React component implement 'swipe to delete' UI-pattern.
React-swipe-to-delete-component is available via npm.
npm install --save react-swipe-to-delete-component
Else you can download the latest builds directly from the "dist" folder above.
The React-swipe-to-delete-component wrap your a content component. It's become swiped. If it's swiped more certain percent than the swipe-to-delete-component will remove a component.
You may see an example here.
import React from 'react';
import { render } from 'react-dom';
// Import the react-swipe-to-delete-component
import SwipeToDelete from 'react-swipe-to-delete-component';
const data = [
{id: 1, text: 'End of summer reading list', date: '1.03.2016'},
{id: 2, text: 'Somewhere in the middle 📸', date: '23.01.2017'},
{id: 3, text: 'Good morning to 9M of you?!?! ❤️🙏🏻Feeling very grateful and giddy.', date: '12.01.2019'}
];
const list = data.map(item => (
<SwipeToDelete key={item.id} item={item}>
<a className="list-group-item">
<h4 className="list-group-item-heading">{item.date}</h4>
<p className="list-group-item-text">{item.text}</p>
</a>
</SwipeToDelete>
));
const app = (
<div className="list-group">
{list}
</div>
);
render(app, document.getElementById('root'));
<SwipeToDelete />
component. Optional.<SwipeToDelete />
component. Optional.You may set up styles in "swipe-to-delete.css" under the comment "Custom styles". The class js-content is content region, js-delete is delete region. Classes js-transition-delete-right and js-transition-delete-left are added on a content component when it's swiped more than "deleteSwipe" options. Class js-transition-cancel is added when a content component swiped less than "deleteSwipe" options. Animations are made by CSS3 transition.
See the CHANGELOG.
From opening a bug report to creating a pull request: every contribution is appreciated and welcome. If you're planing to implement a new feature or change the api please create an issue first.
v0.5.5
FAQs
A simple React component implement 'swipe to delete' UI-pattern.
The npm package react-swipe-to-delete-component receives a total of 270 weekly downloads. As such, react-swipe-to-delete-component popularity was classified as not popular.
We found that react-swipe-to-delete-component 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
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.