npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

nexva-react

v1.0.18

Published

React and Next.js components for Nexva AI Chat Widget

Downloads

668

Readme

nexva-react

React and Next.js components for integrating Nexva AI Chat Widget into your application.

🌐 Website: nexva.pages.dev
📚 Documentation: nexva.pages.dev/docs
🎮 Playground: nexva.pages.dev/playground

Installation

npm install nexva-react
# or
yarn add nexva-react
# or
pnpm add nexva-react

Usage

Next.js (App Router)

// app/layout.tsx
import { NexvaChatNext } from 'nexva-react';

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        {children}
        <NexvaChatNext
          config={{
            apiKey: 'your-api-key',
            position: 'bottom-right',
            primaryColor: '#32f08c',
            enableVoice: true,
            enableHumanSupport: true,
          }}
        />
      </body>
    </html>
  );
}

Next.js (Pages Router)

// pages/_app.tsx
import { NexvaChatNext } from 'nexva-react';

function MyApp({ Component, pageProps }) {
  return (
    <>
      <Component {...pageProps} />
      <NexvaChatNext
        config={{
          apiKey: 'your-api-key',
        }}
      />
    </>
  );
}

export default MyApp;

React (Create React App, Vite, etc.)

import { NexvaChat } from 'nexva-react';

function App() {
  return (
    <div>
      <h1>My App</h1>
      <NexvaChat
        config={{
          apiKey: 'your-api-key',
          primaryColor: '#32f08c',
        }}
      />
    </div>
  );
}

Using the Hook

import { useNexva } from 'nexva-react';

function MyComponent() {
  const { open, close } = useNexva({
    apiKey: 'your-api-key',
  });

  return (
    <div>
      <button onClick={open}>Open Chat</button>
      <button onClick={close}>Close Chat</button>
    </div>
  );
}

Configuration Options

Basic Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | apiKey | string | required | Your Nexva API key | | apiUrl | string | (auto) | API endpoint URL (optional, defaults to your backend) | | position | 'bottom-right' \| 'bottom-left' | 'bottom-right' | Widget position on screen | | primaryColor | string | '#32f08c' | Primary brand color | | buttonColor | string | primaryColor | Chat button color | | headerText | string | 'Nexva' | Header text in chat window | | welcomeMessage | string | 'Hi! How can I help...' | Welcome message shown to users | | placeholder | string | 'Type your message...' | Input field placeholder text | | theme | 'light' \| 'dark' | 'light' | Theme mode |

Styling Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | borderRadius | string | '12px' | Border radius for chat window | | borderColor | string | '#E5E7EB' | Border color for chat window | | borderWidth | string | '1px' | Border width for chat window | | buttonSize | string | '60px' | Chat button size |

Feature Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | enableVoice | boolean | true | Enable voice chat feature | | enableHumanSupport | boolean | true | Enable human support transfer | | enableIntroSound | boolean | true | Play intro sound on first open | | enableDock | boolean | true | Enable dock/minimize feature | | enableFullscreen | boolean | true | Enable fullscreen mode | | autoOpen | boolean | false | Auto-open widget on page load | | presetQuestions | string[] | [] | Preset questions to show users |

Bubble Customization

| Option | Type | Default | Description | |--------|------|---------|-------------| | bubble.backgroundColor | string | '#32f08c' | Bubble background color | | bubble.size | string | '60px' | Bubble size | | bubble.shape | 'circle' \| 'square' | 'circle' | Bubble shape | | bubble.icon | string | 'chat' | Bubble icon type | | bubble.iconColor | string | '#ffffff' | Bubble icon color | | bubble.customIconUrl | string | '' | Custom icon URL (overrides icon) | | bubble.shadow | boolean | true | Enable bubble shadow | | bubble.animation | 'pulse' \| 'bounce' \| 'none' | 'pulse' | Bubble animation type |

TypeScript Support

This package includes TypeScript definitions out of the box.

import type { NexvaChatConfig } from 'nexva-react';

const config: NexvaChatConfig = {
  apiKey: 'your-api-key',
  primaryColor: '#32f08c',
};

License

MIT


Get StartedDocumentationDashboard