Vue.js integration: reusable components
This page provides production-ready wrapper components for the Weavr SDK. For the underlying patterns these components are built on, see Component patterns.
Reusable wrapper components
For production applications, create reusable wrapper components that encapsulate SDK logic. This approach provides a cleaner API, reduces boilerplate, and makes components easier to test and maintain.
Available wrapper components
The following wrapper components cover all Weavr SDK integration patterns:
Input + Tokenize Pattern:
| Component | Purpose |
|---|---|
WeavrPasswordInput | Password input with tokenize |
WeavrPasscodeInput | Passcode input (6-digit) with tokenize |
WeavrConfirmPassword | Password + confirm password pair |
Authenticated Display Pattern:
| Component | Purpose |
|---|---|
WeavrCardNumber | Display card number (requires auth) |
WeavrCvv | Display CVV (requires auth) |
WeavrCardPin | Display card PIN (requires auth) |
Authenticated Input Pattern:
| Component | Purpose |
|---|---|
WeavrCardPinCapture | Capture/set card PIN (requires auth) |
Full-Screen Verification Pattern:
| Component | Purpose |
|---|---|
WeavrKyc | Consumer KYC verification (requires auth) |
WeavrKyb | Corporate KYB verification (requires auth) |
WeavrDirectorKyc | Director KYC verification (NO auth) |
Provider:
| Component | Purpose |
|---|---|
WeavrAuthProvider | Authentication context provider |
All authenticated components can be used standalone (pass authToken prop) or within a WeavrAuthProvider which handles authentication once for all children.
Recommended directory structure
Organize wrapper components by their integration pattern:
src/components/weavr/
├── input-tokenize/
│ ├── WeavrPasswordInput.vue
│ ├── WeavrPasscodeInput.vue
│ ├── WeavrConfirmPassword.vue
│ └── index.ts
├── authenticated-display/
│ ├── WeavrCardNumber.vue
│ ├── WeavrCvv.vue
│ ├── WeavrCardPin.vue
│ └── index.ts
├── authenticated-input/
│ ├── WeavrCardPinCapture.vue
│ └── index.ts
├── verification/
│ ├── WeavrKyc.vue
│ ├── WeavrKyb.vue