vue-and-devices-mocks

Vector devices mockups as vue components
1,951 10
Install
npm install vue-and-devices-mocks
Latest Version:1.0.0
Vue:2
License:MIT
Last Updated:Nov 20, 2018
Links: GitHub  ·  npm
Maintainer: pavelshar

Vue and Devices Mocks

Vector devices mockups Includes:

  • iphone
  • ipad
  • ipad-mini
  • mac-browser

Example

Installation

npm install vue-and-devices-mocks # OR yarn add vue-and-devices-mocks

Basic usage

  • Import device component from vue-and-devices-mocks
  • Register it as component
  • Use it in your template
  • Add props and content
<template>
    <device v-bind="$data">
        // ... your awesome content here
    </device>
</template>

<script>
    import device from 'vue-and-devices-mocks'
    export default {
        components: {device},
        data() {
            return {
                type: 'iphone',
                scale: 7,
                width: null,
                height: null,
                skins: ['black', 'noShadow']
            }
        },
    }
</script>

Props

type
  • Type: String
  • Default: null

Device type: iphone, ipad, ipad-mini, browser


scale
  • Type: Number
  • Default: 1

Scale number, from 1 to 30


width
  • Type: String
  • Default: null

Custom content width


height
  • Type: String
  • Default: null

Custom content height


skins
  • Type: [String, Array]
  • Default: null

Device skins: dark, inverted, noShadow, touch


Slots

default

Default slot where you should render your device's content


Related Packages

ipad-cursor

Mouse effect of iPad in browser that can be used in any framework

3,164 458
zmp-vue

Build full featured iOS & Android apps using ZMP & Vue

4,643
framework7-vue

Build full featured iOS & Android apps using Framework7 & Vue

177,576 18,770

Version History

Version Released Vue License
1.0.0 ^2.5.17 MIT