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 🙏

© 2026 – Pkg Stats / Ryan Hefner

feedbackly-sdk

v1.2.0

Published

JavaScript SDK for Feedbackly - Easy feedback collection widget

Readme

Feedbackly SDK

A lightweight JavaScript SDK for collecting user feedback with a beautiful, customizable widget.

Features

  • 🎨 Customizable Design - Full control over colors, fonts, and layout
  • 📱 Responsive - Works perfectly on desktop and mobile devices
  • ⚡ Lightweight - Minimal bundle size with no external dependencies
  • 🔧 Easy Integration - Simple API with comprehensive documentation
  • 🎯 Multiple Feedback Types - Rating, text feedback, and categories
  • 🔒 Secure - Built with security best practices
  • 🌐 Cross-Browser - Works in all modern browsers
  • ♿ Accessible - WCAG compliant with keyboard navigation support
  • 🔧 Development Mode - Automatic detection and simulation for local development
  • 📝 TypeScript Support - Full type definitions included
  • ✅ Robust Validation - Comprehensive configuration validation
  • 🛡️ Error Handling - Graceful error handling and recovery

Installation

CDN (Recommended)

<script src="https://cdn.feedbackly.com/sdk/feedbackly.min.js"></script>

NPM

npm install feedbackly-sdk
import Feedbackly from 'feedbackly-sdk';

Development Mode

The SDK automatically detects development environments and provides helpful features:

  • Automatic Detection: Detects localhost, demo API keys, and development flags
  • Simulated API Calls: No real API requests in development mode
  • Enhanced Logging: Detailed console logs for debugging
  • Error Simulation: Safe error handling without breaking your app

Development mode is automatically enabled when:

  • Running on localhost or 127.0.0.1
  • Using demo API keys (demo-api-key, test-key)
  • Adding ?feedbackly-dev=true to your URL

Quick Start

// Initialize Feedbackly
const feedbackly = new Feedbackly({
    apiKey: 'your-api-key',
    websiteId: 'your-website-id'
});

// Initialize and show the widget
feedbackly.init().show();

Configuration

Basic Configuration

const feedbackly = new Feedbackly({
    // Required
    apiKey: 'your-api-key',
    websiteId: 'your-website-id',
    
    // Optional
    apiUrl: 'https://api.feedbackly.com',
    timeout: 10000,
    
    // Widget appearance
    theme: {
        primaryColor: '#007bff',
        backgroundColor: '#ffffff',
        textColor: '#333333',
        borderColor: '#e1e5e9',
        borderRadius: '8px',
        fontFamily: 'system-ui, -apple-system, sans-serif',
        fontSize: '14px'
    },
    
    // Widget position and size
    position: {
        bottom: '20px',
        right: '20px'
    },
    size: {
        width: '350px',
        height: '500px'
    },
    zIndex: 9999,
    
    // Trigger button
    trigger: {
        icon: '💬',
        size: '60px',
        iconSize: '24px'
    },
    
    // Text content
    text: {
        title: 'Share Your Feedback',
        ratingLabel: 'How would you rate your experience?',
        feedbackLabel: 'Tell us more (optional)',
        feedbackPlaceholder: 'Share your thoughts...',
        submitButton: 'Submit',
        cancelButton: 'Cancel'
    },
    
    // Features
    categories: [
        { value: 'bug', label: 'Bug Report' },
        { value: 'feature', label: 'Feature Request' },
        { value: 'general', label: 'General Feedback' }
    ],
    
    // User information
    user: {
        id: 'user-123',
        email: '[email protected]',
        name: 'John Doe'
    }
});

API Reference

Methods

init(config)

Initialize the SDK with configuration.

feedbackly.init({
    apiKey: 'your-api-key',
    websiteId: 'your-website-id'
});

show()

Show the feedback widget.

feedbackly.show();

hide()

Hide the feedback widget.

feedbackly.hide();

toggle()

Toggle the feedback widget visibility.

feedbackly.toggle();

setUser(userInfo)

Set user information for feedback context.

feedbackly.setUser({
    id: 'user-123',
    email: '[email protected]',
    name: 'John Doe'
});

track(eventName, eventData)

Track custom events.

feedbackly.track('page_view', {
    page: '/products',
    category: 'electronics'
});

submitFeedback(feedbackData)

Submit feedback programmatically.

feedbackly.submitFeedback({
    rating: 5,
    text: 'Great product!',
    category: 'general'
});

getConfig()

Get current configuration.

const config = feedbackly.getConfig();

updateConfig(newConfig)

Update configuration.

feedbackly.updateConfig({
    theme: {
        primaryColor: '#28a745'
    }
});

destroy()

Destroy the SDK instance and clean up.

feedbackly.destroy();

Advanced Usage

Custom Styling

const feedbackly = new Feedbackly({
    apiKey: 'your-api-key',
    websiteId: 'your-website-id',
    theme: {
        primaryColor: '#e74c3c',
        backgroundColor: '#2c3e50',
        textColor: '#ecf0f1',
        borderRadius: '12px',
        fontFamily: 'Arial, sans-serif'
    }
});

Event Handling

// Track when feedback is submitted
feedbackly.track('feedback_submitted', {
    rating: 5,
    hasText: true,
    category: 'general'
});

// Track widget interactions
feedbackly.track('widget_opened');
feedbackly.track('widget_closed');

Programmatic Feedback Submission

// Submit feedback without showing the widget
feedbackly.submitFeedback({
    rating: 4,
    text: 'Good experience overall',
    category: 'general',
    metadata: {
        page: window.location.pathname,
        referrer: document.referrer
    }
});

Browser Support

  • Chrome 60+
  • Firefox 55+
  • Safari 12+
  • Edge 79+
  • Internet Explorer 11 (with polyfills)

Development

Setup

git clone https://github.com/nkalpakis21/feedbackly-sdk.git
cd feedbackly-sdk
npm install

Build

# Development build
npm run build:dev

# Production build
npm run build

Development Server

npm run dev

Testing

npm test

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

  • 📧 Email: [email protected]
  • 📖 Documentation: https://docs.feedbackly.com
  • 🐛 Issues: https://github.com/nkalpakis21/feedbackly-sdk/issues
  • 💬 Discussions: https://github.com/nkalpakis21/feedbackly-sdk/discussions

Changelog

v1.0.0

  • Initial release
  • Basic feedback widget functionality
  • Customizable themes and styling
  • API integration
  • User management
  • Event tracking