@primer/react-brand
Version:
Primer Brand is a GitHub's design system for creating React-based marketing websites and digital experiences.
38 lines (37 loc) • 933 B
TypeScript
export type UseCursorAnimationOptions = {
/**
* The text content to animate
*/
text: string;
/**
* Whether to animate the text reveal with a cursor effect
*/
animate?: boolean;
/**
* Duration of the reveal animation in milliseconds
*/
duration?: number;
/**
* Delay to start the animation in milliseconds
*/
delay?: number;
/**
* Loads after the page has fully loaded
*/
waitForPageLoad?: boolean;
};
export type UseCursorAnimationResult = {
/**
* Whether the animation is currently running
*/
isAnimating: boolean;
/**
* Whether to show the cursor
*/
showCursor: boolean;
/**
* Progress of the animation (0 to 1)
*/
progress: number;
};
export declare function useCursorAnimation({ text, animate, duration, delay, waitForPageLoad, }: UseCursorAnimationOptions): UseCursorAnimationResult;