🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

vue-twentytwenty-one

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-twentytwenty-one

[![npm](https://img.shields.io/npm/v/vue-twentytwenty-one.svg) ![npm](https://img.shields.io/npm/dm/vue-twentytwenty-one.svg)](https://www.npmjs.com/package/vue-twentytwenty-one) [![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://vuej

1.0.6
latest
Source
npm
Version published
Weekly downloads
7
Maintainers
1
Weekly downloads
 
Created
Source

Vue-TwentyTwenty-One

npm npm vue2

A small component to quickly let users see the differences between 2 images. This is a fork of vue-twentytwenty.

Installation

$ npm install vue-twentytwenty-one

##git Usage

import 'vue-twentytwenty-one/dist/vue-twentytwenty-one.css';
import TwentyTwenty from 'vue-twentytwenty-one';

export default {
  // ...
  components: {
    TwentyTwenty
  },
  data() {
    return {
      offset: 0.5
    }
  }
  // ...
};

It can then be used like so:

<TwentyTwenty
  v-model="offset"
  before="//placehold.it/600x200/E8117F/FFFFFF"
  after="//placehold.it/600x200/CCCCCC/FFFFFF" />

Props

PropsDescriptionRequiredTypeDefault
beforeURL of before imagetrueString-
beforeLabelWhen hovering over image what label should show up over before imagefalseString-
afterURL of after imagetrueString-
afterLabelWhen hovering over image what label should show up over after imagefalseString-
valueHow far from the left the slider should be on load (between 0 and 1)falseNumber0.5
keyboardStepHow far the slider should be moved on arrow key press (between 0 and 1)falseNumber0.2
lockLocks the 20-20, so the offset can't be changedfalseBooleanfalse

Events

EventDescription
inputTriggered when the offset changes
clickTriggered if the Twentytwenty is clicked without moving the slider

FAQs

Package last updated on 20 Aug 2020

Did you know?

Socket

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