Socket
Socket
Sign inDemoInstall

vue-tinybox

Package Overview
Dependencies
0
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-tinybox

A slick, yet tiny lightbox gallery component for Vue.js


Version published
Maintainers
1
Install size
57.6 kB
Created

Readme

Source

vue-tinybox

A slick, yet tiny lightbox gallery component for Vue.js

Demo

The live demo can be found at https://NickKaramoff.github.io/vue-tinybox

Install

Node.js

Install the module as you normally would via npm or yarn:

npm install vue-tinybox
# or
yarn add vue-tinybox

Browsers

Just include the link to the Tinybox in your <head>:

<script src="path/to/vue.js"></script>
<script src="path/to/tinybox.min.js"></script>

Usage

If you're using the Tinybox not from the browser, you'll have to import it:

import Tinybox from "vue-tinybox";

Then you include it your usual way:

Vue.component('tinybox', Tinybox);

// or

Vue.use(Tinybox);

// or, inside a Vue instance or SFC

{
    components: { Tinybox }
}

Then you can use the Tinybox component:

<Tinybox
    :images="images"
    :index="idx"
    @close="idx = null"
/>

The Tinybox component accepts these props:

Prop nameTypeDefaultDescription
imagesArray[]The array of either image URLs or Image objects
indexNumbernullnull
loopBooleanfalseIndicates whether the images should loop

The Image object is an object with following fields:

Field nameTypeDescription
srcStringThe URL of the image
altStringThe text to be set inside alt attribute, i.e. text for screen readers or to be shown if the image can't load
thumbnailStringThe URL of the smaller version of the image to be shown in the thumbnail strip

Keywords

FAQs

Last updated on 23 Aug 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc