decay
Keep moving at velocity, slowing down until it stops or meets the clamp.
Usage
Drag and release
import { Box, decay, motion, pan } from 'kuito';
export function Drawer() {
const drag = pan({ axis: 'y' }).release(decay({ clamp: [0, 400] }));
const y = motion(0).follows(drag.y);
return <Box gestures={[drag]} translateY={y} height={120} backgroundColor="#0f172a" />;
}Signatures
(config?: DecayConfig): AnimationParameters
| Name | Type | Required | Description |
|---|---|---|---|
config | DecayConfig | No | — Default: {} |
Returns
Animation<number>
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.