Swipe Actions
Touch-friendly swipe gesture component with multi-directional support, progressive actions, and customizable animations
Pro Features
Unlock advanced capabilities with the Pro version
Multi-Directional
Swipe in all four directions (left, right, up, down) for different actions
Progressive Actions
Multiple actions per direction with threshold-based disclosure
Haptic Feedback
Optional vibration feedback on action trigger for enhanced UX
Auto-Reset
Configurable auto-reset with customizable delay after action
Animation Types
Spring, bounce, ease, and linear animations with full customization
Keyboard Support
Arrow keys reveal and run the matching action, with an aria-live announcement for screen readers
Installation
Install via CLI
npx @moontra/moonui-cli add swipe-actionsUsage
Important Email
Swipe left to delete, right to archive
Examples
Multi-Directional Swipe
Swipe in all four directions for different actions
Swipe in Any Direction
Live Swipe Progress
onSwipeStart, onSwipeProgress and onSwipeEnd wired to a live readout
Standup reminder
Swipe left to snooze, right to archive
Analytics & Undo
onActionExecute feeds an activity log; autoReset={false} returns the row immediately
Q4-forecast.xlsx
brand-guide.pdf
roadmap.key
- no events yet
Confirm Before Destructive
requireConfirm + confirmRequired open a confirmation chip; autoReset withdraws it after resetDelay
Alex Johnson
Swipe left, then tap the chip to confirm
Compliance record
disabled: swipe and keyboard are both inert
No record deleted yet
Progressive Actions
Multiple actions revealed as you swipe further
Progressive Disclosure
Swipe further to reveal more actions
Animation Types
Different animation styles for swipe interactions
Spring
← Swipe to test
Bounce
← Swipe to test
Ease
← Swipe to test
Email List Actions
Real-world email management with multiple actions
Sarah Chen
10:30 AMQ4 Planning Meeting
Marketing Team
YesterdayNew Campaign Launch
John Smith
2 days agoProject Update Required
Task Management
Task list with complete, edit, and delete actions
Complete project documentation
Review pull requests
Update team on progress
Prepare presentation slides
Social Media Actions
Like, comment, share, and more actions
Alex Johnson
2 hours ago
Just launched our new feature! 🎉 Check it out and let me know what you think.
Custom Styling & Sizes
Customize action sizes, spacing, and progress indicators
Small Style
Size: 40px, Spacing: 6px
Medium Style
Size: 52px, Spacing: 10px
Large Style
Size: 64px, Spacing: 14px