vue-wled
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Vue WLED

A Vue 3 plugin to integrate WLED devices with your Vue 3 application.

Note: This is under early active development and may be subject to breaking changes until it reaches a stable version 1.0.0.

Installation

Install WLED Client and Vue WLED:

$ npm install wled-client vue-wled

Then in your app, create the WLED Client instance and pass it to the WLED Client Vue Plugin:

const { createApp } = require('vue')
const { wledClientPlugin } = require('vue-wled')

const app = createApp(App)

const wledClient = new WLEDClient('<Your Device IP>')
app.use(wledClientPlugin(wledClient))

app.mount('#app')

Usage

In your components you can now use the composable useWLEDCLient:

<script setup>
	const { state, reboot } = useWLEDClient()
</script>

<template>
	<div>Device on state: {{ state.on }}</div>
	<button @click="reboot">Reboot</button>
</template>

License

Vue WLED is MIT licensed.

Readme

Keywords

Package Sidebar

Install

npm i vue-wled

Weekly Downloads

9

Version

0.3.0

License

MIT

Unpacked Size

38 kB

Total Files

9

Last publish

Collaborators

  • shiftlimits