UNPKG

@gfazioli/mantine-text-animate

Version:

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

54 lines (53 loc) 2.34 kB
import React from 'react'; import { type BoxProps, type PolymorphicFactory, type StylesApiProps } from '@mantine/core'; import { type NumberTickerBaseProps } from './use-number-ticker'; export type NumberTickerStylesNames = 'root'; export type NumberTickerCssVariables = { root: '--number-ticker-animation-duration' | '--number-ticker-animation-delay'; }; export type NumberTickerEasing = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out'; export interface NumberTickerProps extends BoxProps, NumberTickerBaseProps, StylesApiProps<NumberTickerFactory> { } export type NumberTickerFactory = PolymorphicFactory<{ props: NumberTickerProps; defaultComponent: 'p'; defaultRef: HTMLParagraphElement; stylesNames: NumberTickerStylesNames; vars: NumberTickerCssVariables; }>; /** * NumberTicker Component * * A component that animates a number counting up or down to a target value. * This implementation uses the useNumberTicker hook internally. * * The animation can be controlled using the `started` prop, which allows * you to start and stop the animation programmatically. */ export declare const NumberTicker: (<C = "p">(props: import("@mantine/core").PolymorphicComponentProps<C, NumberTickerProps>) => React.ReactElement) & Omit<React.FunctionComponent<(NumberTickerProps & { component?: any; } & Omit<Omit<any, "ref">, keyof NumberTickerProps | "component"> & { ref?: any; renderRoot?: (props: any) => any; }) | (NumberTickerProps & { component: React.ElementType; renderRoot?: (props: Record<string, any>) => any; })>, never> & import("@mantine/core/lib/core/factory/factory").ThemeExtend<{ props: NumberTickerProps; defaultComponent: "p"; defaultRef: HTMLParagraphElement; stylesNames: NumberTickerStylesNames; vars: NumberTickerCssVariables; }> & import("@mantine/core/lib/core/factory/factory").ComponentClasses<{ props: NumberTickerProps; defaultComponent: "p"; defaultRef: HTMLParagraphElement; stylesNames: NumberTickerStylesNames; vars: NumberTickerCssVariables; }> & import("@mantine/core/lib/core/factory/polymorphic-factory").PolymorphicComponentWithProps<{ props: NumberTickerProps; defaultComponent: "p"; defaultRef: HTMLParagraphElement; stylesNames: NumberTickerStylesNames; vars: NumberTickerCssVariables; }>;