UNPKG

@gfazioli/mantine-text-animate

Version:

The TextAnimate component allows you to animate text with various effects.

64 lines (63 loc) 2.52 kB
import { type BoxProps, type PolymorphicFactory, type StylesApiProps } from '@mantine/core'; import React from 'react'; import { type RotatingTextBaseProps } from './use-rotating-text'; export type RotatingTextStylesNames = 'root' | 'text' | 'entering' | 'exiting'; export type RotatingTextCssVariables = { root: '--text-animate-rotating-speed'; }; export type RotatingTextAnimation = 'slideUp' | 'slideDown' | 'fade' | 'blur' | 'blurUp' | 'blurDown'; export interface RotatingTextProps extends BoxProps, RotatingTextBaseProps, StylesApiProps<RotatingTextFactory> { /** * Animation variant for the transition * @default 'slideUp' */ animation?: RotatingTextAnimation; } export type RotatingTextFactory = PolymorphicFactory<{ props: RotatingTextProps; defaultComponent: 'span'; defaultRef: HTMLSpanElement; stylesNames: RotatingTextStylesNames; vars: RotatingTextCssVariables; }>; /** * RotatingText Component * * A component that cycles through an array of text strings with smooth * enter/exit animations, similar to an animated text carousel. */ export declare const RotatingText: (<C = "span">(props: import("@mantine/core").PolymorphicComponentProps<C, RotatingTextProps>) => React.ReactElement) & Omit<React.FunctionComponent<(RotatingTextProps & { component?: any; } & Omit<any, "component" | keyof RotatingTextProps> & { ref?: any; renderRoot?: (props: any) => any; }) | (RotatingTextProps & { component: React.ElementType; renderRoot?: (props: Record<string, any>) => any; })>, never> & import("@mantine/core").ThemeExtend<{ props: RotatingTextProps; defaultComponent: "span"; defaultRef: HTMLSpanElement; stylesNames: RotatingTextStylesNames; vars: RotatingTextCssVariables; }> & import("@mantine/core").ComponentClasses<{ props: RotatingTextProps; defaultComponent: "span"; defaultRef: HTMLSpanElement; stylesNames: RotatingTextStylesNames; vars: RotatingTextCssVariables; }> & { varsResolver: import("@mantine/core").VarsResolver<{ props: RotatingTextProps; defaultComponent: "span"; defaultRef: HTMLSpanElement; stylesNames: RotatingTextStylesNames; vars: RotatingTextCssVariables; }>; } & import("@mantine/core").PolymorphicComponentWithProps<{ props: RotatingTextProps; defaultComponent: "span"; defaultRef: HTMLSpanElement; stylesNames: RotatingTextStylesNames; vars: RotatingTextCssVariables; }> & Record<string, never>;