decay
Keep moving at velocity, slowing down until it stops or meets the clamp.
Verwendung
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" />;
}Signaturen
(config?: DecayConfig): AnimationParameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
config | DecayConfig | Nein | — Standard: {} |
Rückgabe
Animation<number>
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.