1.2.0 • Published 1 year ago

vue-devices v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

vue-devices

A Vue.js component library for displaying various device frames using the devices.css library. Ideal for showcasing responsive designs within different device mockups.

Installation

To install the package, run:

npm install vue-devices

Usage

First, import and register the VueDevice component in your Vue application. You can do this globally in your main file or locally in individual components.

Global Registration

// main.js or main.ts
import { createApp } from 'vue'
import App from './App.vue'
import VueDevices from 'vue-devices'

const app = createApp(App)

app.use(VueDevices)
app.mount('#app')

Local Registration

<template>
  <VueDevice type="iphone-x" />
</template>

<script setup>
import { VueDevice } from 'vue-devices'
</script>

Component Props

VueDevice

PropTypeDefaultDescription
device'apple-watch-s8' | 'apple-watch-ultra' | 'galaxy-s8' | 'google-pixel-2-xl' | 'google-pixel-6-pro' | 'google-pixel' | 'homepod' | 'imac-pro' | 'imac' | 'ipad-pro-2017' | 'ipad-pro' | 'iphone-14-pro' | 'iphone-14' | 'iphone-8' | 'iphone-x' | 'the-iphone' | 'macbook-pro-2018' | 'macbook-pro' | 'macbook' | 'pro-display-xdr' | 'surface-book' | 'surface-pro-2017' | 'surface-studio''iphone-14'The type of device frame to display.
colorstringThe color of the device frame.
showStripebooleantrueWhether to show the stripe on the device frame.
showHeaderbooleantrueWhether to show the header on the device frame.
showSensorsbooleantrueWhether to show the sensors on the device frame.
showBtnsbooleantrueWhether to show the buttons on the device frame.
showPowerbooleantrueWhether to show the power button on the device frame.
showHomebooleantrueWhether to show the home button on the device frame (if applicable).

Example

<template>
  <div>
    <h1>My Responsive Design</h1>
    <VueDevice type="iphone-x">
      <img src="path-to-your-screenshot.png" alt="App Screenshot" />
    </VueDevice>
  </div>
</template>

<script setup>
import { VueDevice } from 'vue-devices'
</script>

Contributing

Contributions are welcome! Please feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

Marius Mikelsen - marius.mikelsen@gmail.com

Links

Repository

Issues

1.2.0

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago