Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

contember-echo

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contember-echo

A lightweight feedback widget built with Solid.js that allows users to capture screenshots, annotate them, and submit feedback.

latest
npmnpm
Version
0.0.17
Version published
Weekly downloads
51
70%
Maintainers
0
Weekly downloads
 
Created
Source

Echo Widget

A lightweight feedback widget built with Solid.js that allows users to capture screenshots, annotate them, and submit feedback.

Usage

Using as an NPM Package

import { initEcho } from 'contember-echo';

initEcho({
  // Optional: widget position (default: 'bottom-right')
  position: 'bottom-right',
  
  // Optional: primary color for buttons and UI elements
  primaryColor: '#007AFF',

  // Optional: customize all text elements in the widget
  textConfig: {
    welcomeMessage: {
      text: 'Click here to leave feedback',
      closeAriaLabel: 'Close welcome message',
    },
    feedbackForm: {
      title: 'Send Feedback',
      placeholder: "What's on your mind? We'd love to hear your feedback...",
      screenshotAlt: 'Screenshot Preview',
      submitButton: 'Send Feedback',
      minimizeTitle: 'Minimize',
      expandTitle: 'Expand',
      closeTitle: 'Close',
      showFormTitle: 'Show Feedback Form',
    },
    notification: {
      successTitle: 'Thank you for your feedback!',
      errorTitle: 'Something went wrong.',
      errorMessage: 'Failed to send feedback. Please try again.',
      hideTitle: 'Hide notification',
    },
    drawingTooltip: {
      text: 'Click & drag to draw',
    },
  },
  
  // Required: callback function when feedback is submitted
  onSubmit: async (data) => {
    console.log('Feedback submitted:', data);
    // Handle the feedback data (send to server, etc.)
  }
});

Using Directly in HTML

<script type="module">
  import { initEcho } from "https://esm.sh/contember-echo";

  initEcho({
    // Optional: widget position (default: 'bottom-right')
    position: 'bottom-right',
    
    // Optional: primary color for buttons and UI elements
    primaryColor: '#007AFF',

    // Optional: customize all text elements in the widget
    textConfig: {
      welcomeMessage: {
        text: 'Click here to leave feedback',
        closeAriaLabel: 'Close welcome message',
      },
      feedbackForm: {
        title: 'Send Feedback',
        placeholder: "What's on your mind? We'd love to hear your feedback...",
        screenshotAlt: 'Screenshot Preview',
        submitButton: 'Send Feedback',
        minimizeTitle: 'Minimize',
        expandTitle: 'Expand',
        closeTitle: 'Close',
        showFormTitle: 'Show Feedback Form',
      },
      notification: {
        successTitle: 'Thank you for your feedback!',
        errorTitle: 'Something went wrong.',
        errorMessage: 'Failed to send feedback. Please try again.',
        hideTitle: 'Hide notification',
      },
      drawingTooltip: {
        text: 'Click & drag to draw',
      },
    },

    // Required: callback function when feedback is submitted
    onSubmit: async (data) => {
      console.log('Feedback submitted:', data);
      // Handle the feedback data (send to server, etc.)
    }
  });
</script>

Keywords

feedback

FAQs

Package last updated on 29 Jan 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