New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

atoms-widget-core

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atoms-widget-core

Atoms Widget SDK for React applications

latest
npmnpm
Version
1.1.2
Version published
Weekly downloads
405
28.98%
Maintainers
1
Weekly downloads
 
Created
Source

Atoms Widget SDK

A React-based widget SDK for seamlessly integrating Atoms AI chat and voice functionality into web applications. Built with TypeScript and modern React patterns for enterprise-grade reliability.

Features

Core Capabilities

  • Real-time Chat: Full-featured chat implementation with typing indicators and message history
  • Voice Calling: Complete voice conversation support
  • Dual Integration: React component for modern frameworks and HTML custom element for vanilla projects
  • TypeScript First: Full type safety with comprehensive IntelliSense support
  • Responsive Design: Adaptive UI that works across all device sizes

Customization

  • Flexible Positioning: 4 position options (bottom-right, bottom-left, top-right, top-left)
  • Size Variants: Tiny, compact, and full-size layouts
  • Color Theming: Complete color customization for branding consistency
  • Consent Management: Built-in privacy consent flow with customizable content

Installation

React/Next.js Projects

npm install atoms-widget-core
import { AtomsWidget } from "atoms-widget-core";

function App() {
  return (
    <AtomsWidget
      assistantId="your-assistant-id"
      mode="chat"
      position="bottom-right"
      size="full"
      accentColor="#2d9d9f"
      title="AI Assistant"
      chatPlaceholder="How can I help you today?"
    />
  );
}

HTML/Vanilla JavaScript

<!DOCTYPE html>
<html>
  <head>
    <script src="https://unpkg.com/atoms-widget-core@latest/dist/embed/widget.umd.js"></script>
  </head>
  <body>
    <atoms-widget
      assistant-id="your-assistant-id"
      mode="chat"
      position="bottom-right"
      size="full"
      accent-color="#2d9d9f"
      base-color="#ffffff"
      cta-button-color="#000000"
      cta-button-text-color="#ffffff"
      title="AI Assistant"
      chat-placeholder="How can I help you today?"
    ></atoms-widget>
  </body>
</html>

⚙️ Configuration

Required Properties

PropertyTypeDescription
assistantIdstringYour Atoms assistant ID

Layout & Positioning

PropertyTypeDefaultDescription
mode"chat" | "voice""chat"Interaction mode
position"bottom-right" | "bottom-left" | "top-right" | "top-left""bottom-right"Widget position
size"tiny" | "compact" | "full""full"Widget size
borderRadiusnumber16Border radius in pixels

Color Customization

PropertyTypeDefaultDescription
baseColorstring"#ffffff"Background color
accentColorstring"#2d9d9f"Primary accent color
ctaButtonColorstring"#000000"CTA button background
ctaButtonTextColorstring"#ffffff"CTA button text color
agentBubbleColorstring"#F3F4F6"Agent message bubble color
textOnAccentColorstring"#ffffff"Text color on accent backgrounds
secondaryTextColorstring"#6B7280"Secondary text color
primaryTextColorstring"#111827"Primary text color

Text & Labels

PropertyTypeDefaultDescription
titlestring"Talk with AI"Widget title
ctaNamestring"Chat with us"CTA button text
startButtonTextstring"Start"Voice start button text
endButtonTextstring"End Call"Voice end button text
chatPlaceholderstring"Type your message..."Chat input placeholder
avatarUrlstring""Avatar image URL

Empty State Messages

PropertyTypeDescription
voiceEmptyMessagestringMessage shown when voice is inactive
voiceActiveEmptyMessagestringMessage shown during active voice call
chatEmptyMessagestringMessage shown in empty chat
hybridEmptyMessagestringMessage shown in hybrid mode
PropertyTypeDefaultDescription
consentRequiredbooleanfalseRequire privacy consent
consentTitlestring"Privacy Agreement"Consent dialog title
consentContentstringDefault privacy textConsent dialog content

Usage Examples

Customer Support Chat

import { AtomsWidget } from "atoms-widget-core";

export default function SupportWidget() {
  return (
    <AtomsWidget
      assistantId="support-assistant-123"
      mode="chat"
      position="bottom-right"
      size="full"
      accentColor="#3B82F6"
      baseColor="#ffffff"
      title="Customer Support"
      ctaName="Need Help?"
      chatPlaceholder="Describe your issue..."
      consentRequired={true}
      consentTitle="Privacy Notice"
      consentContent="We collect conversation data to improve our service."
    />
  );
}

Voice-Only Assistant

import { AtomsWidget } from "atoms-widget-core";

export default function VoiceAssistant() {
  return (
    <AtomsWidget
      assistantId="voice-assistant-456"
      mode="voice"
      position="bottom-center"
      size="tiny"
      accentColor="#10B981"
      title="Voice Assistant"
      ctaName="Start Voice Chat"
    />
  );
}

HTML Integration with Custom Styling

<!DOCTYPE html>
<html>
  <head>
    <script src="https://unpkg.com/atoms-widget-sdk/dist/embed/widget.umd.js"></script>
    <style>
      atoms-widget {
        --atoms-accent-color: #8b5cf6;
        --atoms-base-color: #f8fafc;
      }
    </style>
  </head>
  <body>
    <atoms-widget
      assistant-id="your-assistant-id"
      mode="chat"
      position="bottom-left"
      size="compact"
      accent-color="#8B5CF6"
      base-color="#F8FAFC"
      title="AI Helper"
      chat-placeholder="Ask me anything..."
      consent-required="true"
    ></atoms-widget>
  </body>
</html>

Built with ❤️ by the Atoms team

Keywords

atoms

FAQs

Package last updated on 11 Sep 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