UNPKG

motion-v

Version:

<h1 align="center"> <img width="35" height="35" alt="Motion logo" src="https://github.com/user-attachments/assets/00d6d1c3-72c4-4c2f-a664-69da13182ffc" /><br />Motion for Vue</h1>

23 lines (22 loc) 1.22 kB
import { Component, DefineComponent, IntrinsicElementAttributes } from 'vue'; import { MotionProps } from './types'; import { FeatureBundle } from '../../features/dom-animation'; import { createVisualElement } from '../../state/create-visual-element'; import { ComponentProps, MotionHTMLAttributes } from '../../types'; type MotionCompProps = { create: <T extends DefineComponent>(T: any, options?: MotionCreateOptions) => DefineComponent<Omit<MotionProps<any, unknown>, 'as' | 'asChild'> & ComponentProps<T>>; }; export interface MotionCreateOptions { forwardMotionProps?: boolean; renderer?: typeof createVisualElement; } /** * Creates a motion component from a base component or HTML tag * Caches string-based components for reuse */ export declare function createMotionComponent(component: string | DefineComponent, options?: MotionCreateOptions): Component; type MotionNameSpace = { [K in keyof IntrinsicElementAttributes]: DefineComponent<Omit<MotionProps<K, unknown>, 'as' | 'asChild' | 'motionConfig' | 'layoutGroup'> & MotionHTMLAttributes<K>, 'create'>; } & MotionCompProps; export declare function createMotionComponentWithFeatures(featureBundle?: FeatureBundle): MotionNameSpace; export {};