diff --git a/src/index.tsx b/src/index.tsx index 98a2027..add5812 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -23,6 +23,7 @@ export type MarqueeProps = React.PropsWithChildren<{ direction?: MarqueeDirection; position?: SharedValue; withGesture?: boolean; + autoStart?: boolean; }>; export type MarqueeRef = { @@ -88,6 +89,7 @@ export const Marquee = React.memo( direction = 'horizontal', position, withGesture = true, + autoStart = true, }, ref ) => { @@ -120,7 +122,7 @@ export const Marquee = React.memo( } else { anim.value += speed * frameDelta; } - }, true); + }, autoStart); useDerivedValue(() => { if (position) {