vue-webble

0.1.0 • Public • Published

vue-webble

Web Bluetooth LE UI plugin for Vue.js

Demo page

vue webble no devices

vue webble list

vue webble connected list

Features

  • Manage Web Bluetooth LE devices reactively
  • Simple, clean and responsive UI component can be integrated to Web app

Installation

For NPM

  $npm install --save vue-webble

Or from YARN

  $yarn add vue-webble

Mount Component

in your component, import the package as a child component.

import VueWebble from "vue-webble";
 
export default {
  // ...
  components: {
    VueWebble
  }
};

Component Usages

Add VueWebble into your single component file

<template>
  <!-- ... -->
  <VueWebble
    filter-type="all"
    :services="[
      'alert_notification'
    ]"
    @scanned-devices="handleScannedDevices"
    @connected-devices="handleConnectedDevices"
  />
  <!-- ... -->
</template>

Binding events

The <VueWebble/> element emits several events which you can use to observe and respond to changes in component state.

  • @scanned-devices is fired when BLE scanning is enabled and user accepts to pair to the particular device.
  • @connected-devices is fired when one device is connected from scanned devices list.

Contributing

If you're interested in contributing to Vue-Webble or share your opinions, please consider to submitting a pull request or post issues.

Package Sidebar

Install

npm i vue-webble

Weekly Downloads

4

Version

0.1.0

License

MIT

Unpacked Size

1.64 MB

Total Files

36

Last publish

Collaborators

  • hanhdt