VIP3 DOCS
  • VIP3 DOCS
    • 🌎For Users
      • What is VIP3?
      • Why Did We Build VIP3?
      • How Does VIP3 Work?
      • How Do I Use VIP3?
      • VIP3 Pass
      • VIP3 Credit Infrastructure
      • VIP3 Roadmap
      • VIP3 Tokenomics(Draft)
      • VIP3 Fly Wheel
    • 🖥️For Developers
      • Intergrating VIP3 SBT
      • All Chains integration
      • Single Chain integration
      • Contract Address
      • SBT Attributes Demo
      • Smart Contracts
      • Use Case
    • 🤝For Partners
    • 🎨For Designers
Powered by GitBook
On this page
  • Use Case
  • Installation
  • Quickstart
  • props
  • lang
  • theme
  • open
  • onClose
  1. VIP3 DOCS

For Developers

PreviousVIP3 Fly WheelNextIntergrating VIP3 SBT

Last updated 1 year ago

Use Case

Installation

# yarn 
yarn add @vip3/vip3-benefit-widget

# npm
npm install add @vip3/vip3-benefit-widget

Quickstart

import { VIP3Widget, LANG, THEME } from '@vip3/vip3-benefit-widget'

// in VUE
<VIP3Widget
  benefit-id={'benefitId'}
  lang={LANG.ZH}
  theme={THEME.Dark}
  open={true}
  @close={() => {
    // close Callback
  }}
/>

// in TSX
<VIP3Widget
  benefitId={'benefitId'}
  lang={LANG.ZH}
  theme={THEME.Dark}
  open={true}
  onClose={() => {
    // close Callback
  }}
/>

props

benefitId

Specify the benefit information to be loaded in widget

benefit Id: string


lang

The widget language

lang: enum LANG

LANG.EN | LANG.EN


theme

The widget UI Color theme

theme: enum THEME

THEME.Dark | THEME.Light


open

If true, the widget is shown.

open: boolean


onClose

Callback fired when the widget requests to be closed.

open: func

🖥️