You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

konvolo-channel-widget

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

konvolo-channel-widget

A React component that embeds a Konvolo Channel in your application.

1.1.2
latest
npmnpm
Version published
Maintainers
1
Created
Source

Konvolo Channel Widget

A React component that embeds a Konvolo Channel in your application.

Installation

npm install konvolo-channel-widget
# or
yarn add konvolo-channel-widget

Usage

Basic Usage

import KonvoloChannel from "konvolo-channel-widget";

function App() {
  return <KonvoloChannel cid="your-channel-id" theme="light" />;
}

The KonvoloProvider provides a more flexible way to manage multiple channels and their states:

import { KonvoloProvider, useKonvolo } from "konvolo-channel-widget";

// Wrap your app with the provider
function App() {
  return (
    <KonvoloProvider
      initialChannels={{
        channel1: { cid: "your-channel-id", theme: "light" },
      }}
    >
      <YourApp />
    </KonvoloProvider>
  );
}

// Use the channels in your components
function YourComponent() {
  const { openChannel, closeChannel, addChannel } = useKonvolo();

  useEffect(() => {
    // Add a channel
    addChannel("my-channel", {
      cid: "your-channel-id",
      theme: "light",
    });
  }, []);

  return (
    <button onClick={() => openChannel("my-channel")}>Open Channel</button>
  );
}

Props

KonvoloChannel Props

PropTypeDefaultDescription
cidstringrequiredThe channel ID for your Konvolo Channel
theme"light" | "dark""light"The theme of the channel
widthstring"100%"The width of the channel iframe
heightstring"100%"The height of the channel iframe
styleReact.CSSPropertiesundefinedAdditional CSS styles to apply to the iframe
smallbooleanfalseWhether to display the channel in small mode. Sets to true by default if height is less than 600px
language"sv" | "en" | "fi" | "no" | "da" | "de" | "es" | "fr" | "it"navigator.languageThe language of the channel.
onInterviewCompleted() => voidundefinedCallback function when the interview is completed
onInterviewStarted() => voidundefinedCallback function when the interview is started
onChannelLoaded() => voidundefinedCallback function when the channel is loaded
metadataRecord<string, string>undefinedAdditional metadata to pass to the channel
emailstringundefinedPre-fill the email field in the channel
firstAnswerstringundefinedPre-fill the first answer in the channel
testbooleanfalseIf true, responses and insights will no be generated
showCloseButtonbooleanfalseWhether to show the close button in the channel
showResetButtonbooleanfalseWhether to show the reset button in the channel

KonvoloProvider Props

PropTypeDefaultDescription
childrenReactNoderequiredThe child components to render
initialChannelsRecord<string, KonvoloChannelProps>{}Initial channels to be managed by the provider
modalStyleReact.CSSProperties{}Additional CSS styles to apply to the modal container

useKonvolo Hook

The useKonvolo hook provides the following methods:

MethodParametersDescription
openChannel(id: string) => voidOpens a channel with the specified ID
closeChannel(id: string) => voidCloses a channel with the specified ID
updateChannelProps(id: string, props: Partial) => voidUpdates the props of a channel
addChannel(id: string, props: KonvoloChannelProps) => voidAdds a new channel to be managed by the provider
removeChannel(id: string) => voidRemoves a channel from the provider
channelsRecord<string, ChannelState>Current state of all channels

Features

  • Responsive iframe that adapts to your container
  • Light and dark theme support
  • Multiple language support
  • Event callbacks for interview status
  • Customizable styling
  • Small mode for compact display
  • Metadata support for additional information
  • Email and first answer pre-filling
  • Modal-based channel management with KonvoloProvider
  • Multiple channel support
  • Channel state management

Minimum Dimensions

The channel has minimum dimensions to ensure proper display:

  • Minimum width: 300px
  • Minimum height: 140px

Browser Support

The widget requires a modern browser that supports:

  • React 16.8+
  • ES6+
  • Iframe communication

Security

The widget uses iframe communication and requires the following permissions for proper functionality:

  • clipboard-write: For copying content from the channel
  • microphone: Required if voice features are activated in the channel

Content Security Policy (CSP)

To properly integrate the Konvolo Channel widget, you need to configure your Content Security Policy to allow communication with the Konvolo portal. Add the following to your server's response headers:

const cspHeader = `
  default-src 'self';
  frame-src 'self' https://portal.konvolo.com;
  connect-src 'self' https://portal.konvolo.com;
  script-src 'self' 'unsafe-inline' 'unsafe-eval';
  style-src 'self' 'unsafe-inline';
  media-src 'self' https://portal.konvolo.com;
`;

response.headers.set("Content-Security-Policy", cspHeader);

Note: The media-src directive is added to allow microphone access through the iframe.

License

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy...

FAQs

Package last updated on 18 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts