Contact Widget
What this skill produces
A single self-contained HTML file with a floating chat widget that includes:
- Chat bubble — fixed bottom-right circular button, opens/closes the panel
- Welcome home screen — agent avatar + name + online status + greeting message
- Message input — text field with emoji/send icons (UI only; wire to your own backend)
- Social links — row of circular icons (Telegram, WhatsApp, Instagram, Messenger, Discord, Slack — only the ones the user provides)
- Meeting card — optional "Book a meeting" entry with calendar icon, links to user-provided URL (Calendly, Cal.com, Lark, etc.)
- Offline form — fallback contact form (name, email, message) when
is_available=false
- 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
- Resolve primary color, agent name, greeting text, online/offline state,
social links, and optional meeting URL from the request and known context.
Use the documented defaults and omit empty optional links. Ask one
consolidated form only if a missing value would materially change the
requested widget and cannot be safely defaulted.
- Generate one HTML file with all provided values inlined as literals (no template engine, no
{{ }} placeholders in the output)
- Open the widget panel by default on first paint so the preview is useful
- 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:you@example.com?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:
Do not auto-inject any <script> into the generated output — only add backend integration if the user explicitly opts in.
1---
2name: "contact-widget"
3description: "Self-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies."
4triggers:
5 - "contact widget"
6 - "chat widget"
7 - "floating chat"
8 - "live chat widget"
9
10od:
11 mode: "prototype"
12 platform: "desktop"
13 scenario: "engineering"
14 preview:
15 type: "html"
16 entry: "example.html"
17 width: 420
18 height: 640
19 reload: "debounce-300"
20 design_system:
21 requires: false
22 inputs:
23 - name: primary_color
24 type: string
25 default: "#4F7CFF"
26 - name: agent_name
27 type: string
28 default: "Assistant"
29 - name: greeting
30 type: string
31 default: "Hello! How can I help you today?"
32 - name: is_available
33 type: boolean
34 default: true
35 - name: social_telegram
36 type: string
37 default: ""
38 - name: social_whatsapp
39 type: string
40 default: ""
41 - name: social_instagram
42 type: string
43 default: ""
44 - name: meeting_url
45 type: string
46 default: ""
47 - name: offline_message
48 type: string
49 default: "We're currently offline. Leave a message and we'll get back to you!"
50 outputs:
51 primary: example.html
52 example_prompt: "Create a contact widget for my portfolio site. Primary color #4F7CFF, agent name 'Alex', greeting 'Hey! How can I help you today?', show Telegram and WhatsApp links."
53metadata:
54 source: https://skillmd.com/skills/nexu-io/contact-widget
55---
56
57# Contact Widget
58
59## What this skill produces
60
61A single self-contained HTML file with a floating chat widget that includes:
62
631. **Chat bubble** — fixed bottom-right circular button, opens/closes the panel
642. **Welcome home screen** — agent avatar + name + online status + greeting message
653. **Message input** — text field with emoji/send icons (UI only; wire to your own backend)
664. **Social links** — row of circular icons (Telegram, WhatsApp, Instagram, Messenger, Discord, Slack — only the ones the user provides)
675. **Meeting card** — optional "Book a meeting" entry with calendar icon, links to user-provided URL (Calendly, Cal.com, Lark, etc.)
686. **Offline form** — fallback contact form (name, email, message) when `is_available=false`
697. **Mobile responsive** — full-width on small viewports
70
71Output is **pure front-end**. No tracking, no phone-home, no required external services. Works offline once loaded.
72
73## Design direction
74
75Clean, minimal SaaS aesthetic. Looks like a real product widget, not a toy demo:
76
77- **Typography:** Inter (Google Fonts), 14px base, semi-bold headings
78- **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.**
79- **Radius:** 16px on cards, full-round on bubble and avatars
80- **Shadows:** Subtle `0 8px 32px rgba(0,0,0,0.12)` on the widget panel, `0 4px 12px` on bubble
81- **Spacing:** 16px internal padding, 12px gaps between elements
82- **States:** Hover darkens buttons ~5%, active scales bubble 0.95
83
84## Inputs
85
86The skill accepts these parameters from the user:
87
88| Input | Type | Default | Description |
89|-------|------|---------|-------------|
90| `primary_color` | color | `#4F7CFF` | Drives bubble, header, send button, accents |
91| `agent_name` | string | `Assistant` | Displayed in header greeting |
92| `greeting` | string | `Hello! How can I help you today?` | Subtitle in header |
93| `is_available` | boolean | `true` | Online status; `false` shows offline form |
94| `social_telegram` | string | _(empty)_ | Telegram link — omitted if empty |
95| `social_whatsapp` | string | _(empty)_ | WhatsApp link — omitted if empty |
96| `social_instagram` | string | _(empty)_ | Instagram link — omitted if empty |
97| `meeting_url` | string | _(empty)_ | Booking URL (Calendly, Cal.com, etc.) — omitted if empty |
98| `offline_message` | string | `We're currently offline. Leave a message and we'll get back to you!` | Shown when `is_available=false` |
99
100## Workflow
101
1021. Resolve primary color, agent name, greeting text, online/offline state,
103 social links, and optional meeting URL from the request and known context.
104 Use the documented defaults and omit empty optional links. Ask one
105 consolidated form only if a missing value would materially change the
106 requested widget and cannot be safely defaulted.
1072. Generate one HTML file with all provided values inlined as literals (no template engine, no `{{ }}` placeholders in the output)
1083. Open the widget panel by default on first paint so the preview is useful
1094. **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.
110
111## Backend integration (optional, user-driven only)
112
113The 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.
114
115If the user explicitly asks to wire the message input to a real backend, offer these in order of escalating commitment:
116
117### Tier 1 — No backend (default)
118The widget already works as a contact surface via social links + meeting URL. Leave it as-is.
119
120### Tier 2 — One-shot messages, no chat history
121- **`mailto:` fallback** — replace the `send` handler with `window.location.href = 'mailto:you@example.com?subject=...&body=' + encodeURIComponent(text)`. Zero infra, but the visitor's mail client opens.
122- **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.).
123
124### Tier 3 — Real-time chat (visitor ↔ agent, history, typing, presence)
125This needs an IM/chat SDK. Any of the following work; pick whichever fits your stack:
126
127- **Knocket** — https://trtc.io/solutions/knocket (drop-in, free)
128- **Crisp** — https://crisp.chat
129- **Tawk.to** — https://tawk.to
130- **Chatwoot** (self-hosted) — https://chatwoot.com
131- **Intercom** — https://intercom.com
132
133Do not auto-inject any `<script>` into the generated output — only add backend integration if the user explicitly opts in.