Skip to content

Membaca is a Vue 3 component library to scan QR code and read the content. It uses zxingjs/browser to scan the QR code.

License

Notifications You must be signed in to change notification settings

roastedduk/membaca

Repository files navigation

Vue Membaca

Table of Contents

About

vue-membaca is a Vue 3 component library to scan QR code and read the content. It uses zxingjs/browser to scan the QR code.

Getting Started

To use this library, you can install it via npm or yarn.

npm install vue-membaca

Usage

<script setup lang="ts">
const deviceId = ref<string>('')

onMounted(() => {
  const mediaDevices = await navigator.mediaDevices.getUserMedia({ video: true })
  deviceId.value = mediaDevices[0].id
})
</script>

<template>
  <QrCamera
    :device-id="deviceId"
    @result="handleResult"
    @error="handleError"
  />
</template>

About

Membaca is a Vue 3 component library to scan QR code and read the content. It uses zxingjs/browser to scan the QR code.

Topics

Resources

License

Stars

Watchers

Forks