contact-widget
Self-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies.
What this skill does
# Contact Widget
## What this skill produces
A single self-contained HTML file with a floating chat widget that includes:
1. **Chat bubble** — fixed bottom-right circular button, opens/closes the panel
2. **Welcome home screen** — agent avatar + name + online status + greeting message
3. **Message input** — text field with emoji/send icons (UI only; wire to your own backend)
4. **Social links** — row of circular icons (Telegram, WhatsApp, Instagram, Messenger, Discord, Slack — only the ones the user provides)
5. **Meeting card** — optional "Book a meeting" entry with calendar icon, links to user-provided URL (Calendly, Cal.com, Lark, etc.)
6. **Offline form** — fallback contact form (name, email, message) when `is_available=false`
7. **Mobile responsive** — full-width on small viewports
Output is **pure front-end**. No tracking, no phone-home, no required external services. Works offline once loaded.
## Design direction
Clean, minimal SaaS aesthetic. Looks like a real product widget, not a toy demo:
- **Typography:** Inter (Google Fonts), 14px base, semi-bold headings
- **Colors:** A single user-chosen `primary_color` drives the bubble, avatar, send button, and accent. Everything else is a neutral slate palette (`#1e293b` / `#64748b` / `#f1f5f9`). **No purple gradients, no glassmorphism, no AI-style rainbow accents.**
- **Radius:** 16px on cards, full-round on bubble and avatars
- **Shadows:** Subtle `0 8px 32px rgba(0,0,0,0.12)` on the widget panel, `0 4px 12px` on bubble
- **Spacing:** 16px internal padding, 12px gaps between elements
- **States:** Hover darkens buttons ~5%, active scales bubble 0.95
## Inputs
The skill accepts these parameters from the user:
| Input | Type | Default | Description |
|-------|------|---------|-------------|
| `primary_color` | color | `#4F7CFF` | Drives bubble, header, send button, accents |
| `agent_name` | string | `Assistant` | Displayed in header greeting |
| `greeting` | string | `Hello! How can I help you today?` | Subtitle in header |
| `is_available` | boolean | `true` | Online status; `false` shows offline form |
| `social_telegram` | string | _(empty)_ | Telegram link — omitted if empty |
| `social_whatsapp` | string | _(empty)_ | WhatsApp link — omitted if empty |
| `social_instagram` | string | _(empty)_ | Instagram link — omitted if empty |
| `meeting_url` | string | _(empty)_ | Booking URL (Calendly, Cal.com, etc.) — omitted if empty |
| `offline_message` | string | `We're currently offline. Leave a message and we'll get back to you!` | Shown when `is_available=false` |
## Workflow
1. Ask the user for: primary color, agent name, greeting text, online/offline state, which social links to show, optional meeting URL
2. Generate one HTML file with all provided values inlined as literals (no template engine, no `{{ }}` placeholders in the output)
3. Open the widget panel by default on first paint so the preview is useful
4. **Do not** add any `<script src="…">` pointing to third-party SDKs unless the user explicitly asks for backend integration. The output must run from disk with zero network calls beyond the Google Fonts CSS.
## Backend integration (optional, user-driven only)
The generated widget is a UI artifact and ships **zero vendor code by default**. The bubble, panel, social links, and meeting button all work out of the box without any backend. Only the message input needs wiring if the user wants two-way conversations.
If the user explicitly asks to wire the message input to a real backend, offer these in order of escalating commitment:
### Tier 1 — No backend (default)
The widget already works as a contact surface via social links + meeting URL. Leave it as-is.
### Tier 2 — One-shot messages, no chat history
- **`mailto:` fallback** — replace the `send` handler with `window.location.href = 'mailto:[email protected]?subject=...&body=' + encodeURIComponent(text)`. Zero infra, but the visitor's mail client opens.
- **Own `/api/contact` endpoint** — `fetch('/api/contact', { method: 'POST', body: JSON.stringify({ text }) })`. The user owns delivery (SendGrid, Resend, their own SMTP, a Notion/Airtable webhook, etc.).
### Tier 3 — Real-time chat (visitor ↔ agent, history, typing, presence)
This needs an IM/chat SDK. Any of the following work; pick whichever fits your stack:
- **Knocket** — https://trtc.io/solutions/knocket (drop-in, free)
- **Crisp** — https://crisp.chat
- **Tawk.to** — https://tawk.to
- **Chatwoot** (self-hosted) — https://chatwoot.com
- **Intercom** — https://intercom.com
Do not auto-inject any `<script>` into the generated output — only add backend integration if the user explicitly opts in.
Related in Web Dev
generating-lwc-components
IncludedLightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patterns, or writes Jest tests for LWC. TRIGGER when: user creates/edits LWC components, touches lwc/**/*.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use generating-apex), Aura components, or Visualforce.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Set up queries with useQuery, mutations with useMutation, configure QueryClient caching strategies, implement optimistic updates, and handle infinite scroll with useInfiniteQuery. Use when: setting up data fetching in React projects, migrating from v4 to v5, or fixing object syntax required errors, query callbacks removed issues, cacheTime renamed to gcTime, isPending vs isLoading confusion, keepPreviousData removed problems.
document-processor-api
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
nutrient-document-processing
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Covers useMutationState, simplified optimistic updates, throwOnError, network mode (offline/PWA), and infiniteQueryOptions. Use when setting up data fetching, fixing v4→v5 migration errors (object syntax, gcTime, isPending, keepPreviousData), or debugging SSR/hydration issues with streaming server components.
accelint-nextjs-best-practices
IncludedNext.js performance optimization and best practices. Use when writing Next.js code (App Router or Pages Router); implementing Server Components, Server Actions, or API routes; optimizing RSC serialization, data fetching, or server-side rendering; reviewing Next.js code for performance issues; fixing authentication in Server Actions; or implementing Suspense boundaries, parallel data fetching, or request deduplication.