@blossom-carousel/vue
Version:
A native-scroll-first carousel component for Vue.
17 lines (16 loc) • 672 B
TypeScript
import { App, Ref } from 'vue';
/** Registers a slide count for a carousel id on the current Vue app instance. */
export declare function setSlideCount(app: App, id: string, count: number): void;
export interface NavigationState {
activeIndex: number;
count: number;
canPrev: boolean;
canNext: boolean;
}
/**
* Connects a control to a carousel scroller (resolved by element id) using only
* native APIs: registers the Invoker command handler and tracks the live
* navigation state. Never touches a Blossom instance, so it works even when
* Blossom isn't initialized.
*/
export declare function useNavigation(forId: Ref<string>): Ref<NavigationState>;