FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
dcm31
dcm31feedback_widget_demo
Demo of reusable feedback widget library
Public
Like
1
feedback_widget_demo
Home
Code
4
README.md
feedback.md
feedbackWidget.ts
H
index.ts
Branches
1
Pull requests
Remixes
3
History
Environment variables
1
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data โ€“ all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
7/9/2025
README.md

Feedback Widget Demo

This project demonstrates a reusable feedback widget library for Val Town projects.

Features

  • ๐ŸŽจ Clean, minimizable UI that floats at the bottom-right
  • ๐Ÿ“ฑ Mobile-responsive design
  • ๐Ÿ’พ Automatically saves feedback to feedback.md using the correct Val Town SDK methods
  • โšก Easy to integrate - just 2 lines of code
  • ๐ŸŽช Smooth animations and hover effects
  • โœ… Robust file handling with proper create/update logic

Recent Updates

  • โœ… Fixed file writing: Now uses the correct vt.vals.files.getContent() for reading and proper create/update logic
  • โœ… Better error handling: Improved logging and error messages
  • โœ… Reliable operation: Adopted working implementation from test file

How to Use in Your Project

  1. Copy feedbackWidget.ts into your project
  2. Import and use in your main entry point:
import { renderFeedbackWidget, handleFeedbackSubmission } from "./feedbackWidget.ts"; // Add to your HTML template const html = ` <body> <!-- Your content --> ${renderFeedbackWidget()} </body> `; // Add feedback route app.post("/feedback", async (c) => { return await handleFeedbackSubmission(c.req.raw, import.meta.url); });
  1. Create a feedback.md file in your project root

That's it! Users can now submit feedback through the widget.

Project Structure

  • feedbackWidget.ts - The reusable widget library
  • index.ts - Demo implementation
  • feedback.md - Where feedback gets stored
  • README.md - This file

Demo

Visit the live demo to see the widget in action: Demo Link

Customization

The widget can be easily customized by modifying the CSS in feedbackWidget.ts. Change colors, positioning, animations, and more to fit your project's design.

Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesVersion controlCLIAI agentsCode intelligenceSlack integrationsGTMPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
ยฉ 2025 Val Town, Inc.