UNPKG

@progress/kendo-react-animation

Version:

React Animation component assists with animating HTML elements. KendoReact Animation package

85 lines (84 loc) 2.92 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { default as PropTypes } from 'prop-types'; import { AnimationInterface, AnimationEventArguments } from './AnimationInterface.js'; import * as React from 'react'; /** * Specifies the direction of the Reveal Animation ([see example](https://www.telerik.com/kendo-react-ui/components/animation/direction#toc-reveal)). * * The supported directions are: * * (Default) `vertical`&mdash;Reveals the height of the content. * * `horizontal`&mdash;Reveals the width of the content. */ export type RevealDirection = 'horizontal' | 'vertical'; /** * Represents the props of the [KendoReact Reveal Animation component](https://www.telerik.com/kendo-react-ui/components/animation/types#toc-reveal). */ export interface RevealProps extends AnimationInterface { /** * A function for customizing the rendering of child elements. * * @example * <Reveal childFactory={(child) => React.cloneElement(child, { hidden: true })} /> */ childFactory?: any; /** * Specifies the CSS class names to be applied to the Animation container. * * @example * <Reveal className="reveal-animation" /> */ className?: string; /** * Specifies the direction of the Reveal Animation. * * @default "vertical" * @example * <Reveal direction="horizontal" /> */ direction?: RevealDirection; /** * Specifies the HTML tag of the parent Animation container. * * @default "div" * @example * <Reveal component="aside" /> */ component?: React.ReactNode; /** * Specifies the `id` attribute of the Animation container. * * @example * <Reveal id="reveal-animation-container" /> */ id?: string; /** * Specifies the inline styles to be applied to the Animation container. * * @example * <Reveal style={{ padding: "20px" }} /> */ style?: any; /** * @hidden * This is synchronious variant of `onEnter` event. */ onBeforeEnter?: (event: AnimationEventArguments) => void; } export declare const Reveal: { (props: RevealProps): React.JSX.Element; propTypes: { children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; childFactory: PropTypes.Requireable<any>; className: PropTypes.Requireable<string>; direction: PropTypes.Requireable<string>; component: PropTypes.Requireable<PropTypes.ReactNodeLike>; id: PropTypes.Requireable<string>; style: PropTypes.Requireable<any>; }; };