Labsco
anthropics logo

ui-toolkit/web

โœ“ Officialโ˜… 22,378

by anthropic ยท part of anthropics/knowledge-work-plugins

Reference skill for Zoom Video SDK UI Toolkit. Use after routing to a web video workflow when you want prebuilt React UI instead of building a fully custom Video SDK interface.

๐Ÿ”ฅ๐Ÿ”ฅFreeQuick setup
๐Ÿงฉ One of 7 skills in the anthropics/knowledge-work-plugins package โ€” works on its own, and pairs well with its siblings.

This is the playbook your agent receives when the skill activates โ€” you don't need to read it to use the skill, but it's here to audit before installing.

Zoom Video SDK UI Toolkit

Background reference for the prebuilt Zoom Video SDK UI Toolkit on web. Prefer choose-zoom-approach first when the user might still need Meeting SDK instead.

Official Documentation: https://developers.zoom.us/docs/video-sdk/web/ui-toolkit/ API Reference: https://marketplacefront.zoom.us/sdk/uitoolkit/web/ NPM Package: https://www.npmjs.com/package/@zoom/videosdk-zoom-ui-toolkit Live Demo: https://sdk.zoom.com/videosdk-uitoolkit

New to UI Toolkit? Follow this path:

  1. Quick Start - Get running in 5 minutes (see below)
  2. JWT Authentication - Server-side token generation (required)
  3. Composite vs Components - Choose your approach
  4. Framework Integration - React, Vue, Angular, Next.js patterns
  5. Integrated Index - see the section below in this file

Having issues?

  • Session not joining โ†’ Check JWT Authentication (most common issue)
  • React 18 peer dependency error โ†’ See Installation section
  • CSS not loading โ†’ See Troubleshooting
  • Components not showing โ†’ Check Component Lifecycle
  • Start with preflight checks โ†’ 5-Minute Runbook

Overview

The Zoom Video SDK UI Toolkit is a pre-built video UI library that renders complete video conferencing experiences with minimal code. Unlike the raw Video SDK, the UI Toolkit provides:

  • โœ… Ready-to-use UI - Professional video interface out of the box
  • โœ… Zero UI code - No need to build video layouts, controls, or participant management
  • โœ… Framework agnostic - Works with React, Vue, Angular, Next.js, vanilla JS
  • โœ… Highly customizable - Choose which features to enable, customize themes
  • โœ… Built-in features - Chat, screen share, settings, virtual backgrounds included

When to use UI Toolkit:

  • You want a complete video solution quickly
  • You need Zoom-like UI consistency
  • You don't want to build custom video UI
  • You need standard features (chat, share, participants)

When to use raw Video SDK instead:

  • You need complete custom UI control
  • You're building a non-standard video experience
  • You need access to raw video/audio data
  • You want to build your own rendering pipeline

Available Features

FeatureDescription
videoEnable video layout and send/receive video
audioShow audio button, send/receive audio
shareScreen sharing
chatIn-session messaging
usersParticipant list
settingsDevice selection, virtual background
previewPre-join camera/mic preview
recordingCloud recording (paid plan)
leaveLeave/end session button

JWT Token Generation (Server-Side)

Required: Generate JWT tokens on your server, never expose SDK secret client-side.

Node.js / Next.js API Route

import { NextRequest, NextResponse } from 'next/server';
import { KJUR } from 'jsrsasign';

const ZOOM_VIDEO_SDK_KEY = process.env.ZOOM_VIDEO_SDK_KEY;
const ZOOM_VIDEO_SDK_SECRET = process.env.ZOOM_VIDEO_SDK_SECRET;

export async function POST(request: NextRequest) {
  const { sessionName, role, userName } = await request.json();

  if (!sessionName || role === undefined) {
    return NextResponse.json({ error: 'Missing params' }, { status: 400 });
  }

  const iat = Math.floor(Date.now() / 1000);
  const exp = iat + 60 * 60 * 2; // 2 hours

  const oHeader = { alg: 'HS256', typ: 'JWT' };
  const oPayload = {
    app_key: ZOOM_VIDEO_SDK_KEY,
    role_type: role, // 0 = participant, 1 = host
    tpc: sessionName,
    version: 1,
    iat,
    exp,
    user_identity: userName || 'User',
  };

  const signature = KJUR.jws.JWS.sign(
    'HS256',
    JSON.stringify(oHeader),
    JSON.stringify(oPayload),
    ZOOM_VIDEO_SDK_SECRET
  );

  return NextResponse.json({ signature });
}

JWT Payload Fields

FieldRequiredDescription
app_keyYesYour Video SDK Key
role_typeYes0 = participant, 1 = host
tpcYesSession/topic name
versionYesAlways 1
iatYesIssued at (Unix timestamp)
expYesExpiration (Unix timestamp)
user_identityNoUser identifier

API Reference

Core Methods

uitoolkit.joinSession(container, config);
uitoolkit.closeSession(container);

Event Listeners

uitoolkit.onSessionJoined(callback);
uitoolkit.onSessionClosed(callback);
uitoolkit.offSessionJoined(callback);
uitoolkit.offSessionClosed(callback);

Component Methods

uitoolkit.showChatComponent(container);
uitoolkit.hideChatComponent(container);
uitoolkit.showUsersComponent(container);
uitoolkit.hideUsersComponent(container);
uitoolkit.showControlsComponent(container);
uitoolkit.hideControlsComponent(container);
uitoolkit.showSettingsComponent(container);
uitoolkit.hideSettingsComponent(container);
uitoolkit.hideAllComponents();

Next.js with basePath

When deploying Next.js under a subpath:

// next.config.ts
const nextConfig = {
  basePath: "/your-app-path",
  assetPrefix: "/your-app-path",
};

Fetch API routes with full path:

fetch('/your-app-path/api/token', { ... })

Browser Support

BrowserVersion
Chrome78+
Firefox76+
Safari14.1+
Edge79+

Resources


Integrated Index

This section was migrated from SKILL.md.

Complete navigation for all UI Toolkit documentation.

๐Ÿ“š Start Here

New to the UI Toolkit? Follow this learning path:

  1. SKILL.md - Main overview and quick start
  2. 5-Minute Runbook - Preflight checks before deep debugging
  3. Quick Start Guide - Working code in 5 minutes (see skill.md)
  4. JWT Authentication - Server-side token generation (see skill.md)
  5. Choose Your Mode - Composite vs Components (see skill.md)

๐ŸŽฏ Core Concepts

Understanding how UI Toolkit works:

  • Composite vs Components - Two ways to use UI Toolkit (see skill.md)
  • UI Toolkit Architecture - How it wraps Video SDK internally
  • Feature Configuration - Understanding featuresOptions structure
  • Session Lifecycle - Join โ†’ Active โ†’ Leave/Close โ†’ Destroy flow

๐Ÿ“– Complete Guides

Getting Started

  • Installation - NPM install and React 18 setup (see skill.md)
  • Quick Start - Composite - Full UI in one container (see skill.md)
  • Quick Start - Components - Individual UI pieces (see skill.md)
  • JWT Authentication - Server-side token generation (see skill.md)

Framework Integration

  • React Integration - Hooks, useEffect patterns (see skill.md)
  • Vue.js Integration - Composition API and Options API (see skill.md)
  • Angular Integration - Component lifecycle (see skill.md)
  • Next.js Integration - App Router, Server Components (see skill.md)
  • Vanilla JavaScript - No framework usage (see skill.md)

Advanced Topics

  • Component Lifecycle - Mount, unmount, cleanup patterns
  • Event Listeners - React to session events
  • Session Management - Programmatic control
  • Quality Statistics - Monitor connection quality
  • Custom Themes - Theme customization
  • Virtual Backgrounds - Custom background images

๐Ÿ“š API Reference

Complete API documentation:

  • Core Methods (see skill.md)

    • joinSession() - Start a video session
    • closeSession() - End session and remove UI
    • destroy() - Clean up UI Toolkit instance
    • leaveSession() - Leave without destroying UI
  • Component Methods (see skill.md)

    • showControlsComponent() - Display control bar
    • showChatComponent() - Display chat panel
    • showUsersComponent() - Display participants list
    • showSettingsComponent() - Display settings panel
    • hideAllComponents() - Hide all components
  • Event Listeners (see skill.md)

    • onSessionJoined() - Session joined successfully
    • onSessionClosed() - Session ended
    • onSessionDestroyed() - UI Toolkit destroyed
    • onViewTypeChange() - View mode changed
    • on() - Subscribe to Video SDK events
    • off() - Unsubscribe from events
  • Information Methods (see skill.md)

    • getSessionInfo() - Get session details
    • getCurrentUserInfo() - Get current user
    • getAllUser() - Get all participants
    • getClient() - Get underlying Video SDK client
    • version() - Get version info
  • Control Methods (see skill.md)

    • changeViewType() - Switch view mode
    • mirrorVideo() - Mirror self video
    • isSupportCustomLayout() - Check device support
  • Statistics Methods (see skill.md)

    • subscribeAudioStatisticData() - Audio quality stats
    • subscribeVideoStatisticData() - Video quality stats
    • subscribeShareStatisticData() - Share quality stats

๐Ÿ“ฆ Sample Applications

Official Repositories:

FrameworkRepositoryKey Features
Reactvideosdk-zoom-ui-toolkit-react-sampleHooks, TypeScript
Vue.jsvideosdk-zoom-ui-toolkit-vuejs-sampleComposition API
Angularvideosdk-zoom-ui-toolkit-angular-sampleServices, Guards
JavaScriptvideosdk-zoom-ui-toolkit-javascript-sampleVanilla JS
Auth Endpointvideosdk-auth-endpoint-sampleNode.js JWT

๐ŸŒ External Resources

๐ŸŽ“ Learning Path

Beginner

  1. Read SKILL.md overview
  2. Follow Quick Start - Composite
  3. Generate JWT on server
  4. Join your first session
  5. Explore available features

Intermediate

  1. Try Component Mode
  2. Add event listeners
  3. Customize theme
  4. Add virtual backgrounds
  5. Integrate with your framework

Advanced

  1. Access underlying Video SDK
  2. Subscribe to quality statistics
  3. Handle all edge cases
  4. Implement custom layouts
  5. Build production-ready app

๐Ÿ“‹ Quick Reference Card

Minimal Working Example

import uitoolkit from "@zoom/videosdk-zoom-ui-toolkit";
import "@zoom/videosdk-ui-toolkit/dist/videosdk-zoom-ui-toolkit.css";

const config = {
  videoSDKJWT: "YOUR_JWT",
  sessionName: "test-session",
  userName: "User",
  featuresOptions: {
    video: { enable: true },
    audio: { enable: true }
  }
};

uitoolkit.joinSession(document.getElementById("container"), config);
uitoolkit.onSessionJoined(() => console.log("Joined"));
uitoolkit.onSessionClosed(() => uitoolkit.destroy());

Must-Remember Rules

  1. โœ… Always generate JWT server-side
  2. โœ… Always call destroy() on cleanup
  3. โœ… Always use React 18 (not 17/19)
  4. โœ… Always import CSS file
  5. โŒ Never expose SDK secret client-side
  6. โŒ Never skip onSessionClosed cleanup
  7. โŒ Never call components before joinSession

๐Ÿ“ž Support


Navigation: โ† Back to SKILL.md

Environment Variables