UNPKG

@ark-ui/vue

Version:

A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.

32 lines (31 loc) 968 B
import { MaybeRef, ComputedRef, Ref } from 'vue'; import { EmitFn, Optional } from '../../types'; import { RootEmits } from './presence.types'; import * as presence from '@zag-js/presence'; export interface UsePresenceProps extends Optional<presence.Props, 'present'> { /** * Whether to enable lazy mounting * @default false */ lazyMount?: boolean; /** * Whether to unmount on exit. * @default false */ unmountOnExit?: boolean; /** * Whether to allow the initial presence animation. * @default false */ skipAnimationOnMount?: boolean; } export type UsePresenceReturn = ReturnType<typeof usePresence>; export declare const usePresence: (props: MaybeRef<UsePresenceProps>, emit?: EmitFn<RootEmits>) => ComputedRef<{ present: boolean; unmounted: boolean | undefined; presenceProps: { ref: Ref<any, any>; hidden: boolean; 'data-state': string | undefined; }; }>;