@yamada-ui/transitions
Version:
Yamada UI transitions components
90 lines (87 loc) • 2.19 kB
TypeScript
import * as _yamada_ui_motion from '@yamada-ui/motion';
import { WithTransitionProps, MotionProps, MotionVariants } from '@yamada-ui/motion';
import { Token, ThemeProps } from '@yamada-ui/core';
declare const getSlideProps: (placement?: "bottom" | "left" | "right" | "top") => {
readonly enter: {
readonly x: 0;
readonly y: 0;
};
readonly exit: {
readonly x: 0;
readonly y: "100%";
};
readonly position: {
readonly bottom: 0;
readonly left: 0;
readonly maxWidth: "100vw";
readonly right: 0;
};
} | {
readonly enter: {
readonly x: 0;
readonly y: 0;
};
readonly exit: {
readonly x: "-100%";
readonly y: 0;
};
readonly position: {
readonly bottom: 0;
readonly left: 0;
readonly top: 0;
readonly width: "100%";
};
} | {
readonly enter: {
readonly x: 0;
readonly y: 0;
};
readonly exit: {
readonly x: "100%";
readonly y: 0;
};
readonly position: {
readonly bottom: 0;
readonly right: 0;
readonly top: 0;
readonly width: "100%";
};
} | {
readonly enter: {
readonly x: 0;
readonly y: 0;
};
readonly exit: {
readonly x: 0;
readonly y: "-100%";
};
readonly position: {
readonly left: 0;
readonly maxWidth: "100vw";
readonly right: 0;
readonly top: 0;
};
};
declare const slideProps: {
animate: string;
exit: string;
initial: string;
variants: MotionVariants;
};
interface SlideOptions {
/**
* The placement of the slide.
*
* @default 'right'
*/
placement?: Token<"bottom" | "left" | "right" | "top">;
}
interface SlideProps extends WithTransitionProps<MotionProps>, SlideOptions, ThemeProps<"Slide"> {
}
/**
* `Slide` is a component that shows or hides an element from the corners of the page.
*
* @see Docs https://yamada-ui.com/components/transitions/slide
*/
declare const Slide: _yamada_ui_motion.MotionComponent<"div", SlideProps>;
export { Slide, type SlideProps, getSlideProps, slideProps };