- Getting Started
- The Basics
- Concepts
- SuperNative
-
EDGE Components
- Introduction
- Activity Indicator
- Badge
- Bottom Navigation
- Bottom Sheet
- Button
- Button Group
- Canvas
- Carousel
- Checkbox
- Chip
- Column
- Divider
- Gesture Area
- Icon
- Icons
- Image
- Layout & Styling
- List
- Menus
- Modal
- Pressable
- Progress Bar
- Radio Group
- Row
- Scroll View
- Select
- Shapes
- Side Navigation
- Slider
- Spacer
- Stack
- Tab Row
- Text
- Text Input
- Toggle
- Top Bar
- Virtual List
- Web View
- Plugins
- Testing
- Architecture
You're viewing pre-release documentation — version 4.x is in beta
Features, APIs and behaviour may change before the stable release. View the stable version (3.x)
Gesture Area
Overview#
Captures a vertical pan/drag gesture over its content and writes the translation to a bound shared value, so the drag can drive animation on the UI thread with no PHP round-trip. Children render normally — gesture detection wraps the whole content frame.
Copied!
@php $drag = \Native\Mobile\Edge\SharedValue::make(); @endphp <native:gesture-area :pan-y="$drag" @drag-end="onRelease"> <native:column :translate-y="$drag" class="p-6 bg-theme-surface rounded-2xl"> <native:text>Drag me</native:text> </native:column></native:gesture-area>
Props#
pan-y- ASharedValuethat receives the vertical drag translation (required for the gesture to do anything). Bind it, then read it from animatable props (translate-y,opacity,scale, …) on the children.
Events#
@drag-end- Fired when the user lifts their finger, with the final value as{value: float}. Use it to decide commit-vs-revert in PHP:
Copied!
public function onRelease(float $value): void{ if ($value > 150) { $this->dismiss(); }}
Plugin Dev Kit
Build native plugins with
Claude Code
Learn More
NativePHP Ultra
All NativePHP plugins, teams & priority support from
$35/mo
Learn More
The Vibes
The unofficial Laracon US
Day 3
Grab Your Spot
Only 100 tickets!
The Masterclass
Go from zero to
published app
in no time
in no time
Learn More
Early Bird Pricing