Skip to content

1adybug/viewerjs-soda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

viewerjs-soda

NPM version NPM downloads

πŸš€ Functional invocation for viewerjs

Type

/**
 * @param image An image or a group of images.
 * @param options The options of the viewer.
 */
export function view(image: string | string[], options?: ViewerOptions): void
/**
 * @param image A group of images.
 * @param indexOrSrc The index of the image or the src to be displayed.
 * @param options The options of the viewer.
 */
export function view(image: string[], indexOrSrc: number | string, options?: ViewerOptions): void

Usage

import { view } from "viewerjs-soda"

const options: ViewerOptions | undefined = {/** your options */}

// view an image directly
view("https://xxx", options)

// view a group of images
view(["https://aaa", "https://bbb", "https://ccc"], options)

// view a group of images, start with an index
view(["https://aaa", "https://bbb", "https://ccc"], 2, options)

// view a group of images, start with a src
view(["https://aaa", "https://bbb", "https://ccc"], "https://ccc", options)

About

πŸš€ Functional invocation for viewerjs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published