embeds
它能做什么
这项技能说明如何以三种样式将排程页面放到任何网站上,附有代码片段和主题选项。适合希望在自己网站上添加预约功能的开发者。
适用场景
- ✓当你希望预约页面出现在另一个网站内部的时候。
- ✓当你希望有一个打开预约页面的弹出窗口或浮动按钮的时候。
- ✓当你需要让内嵌的预约页面与品牌颜色相匹配的时候。
技能链接
https://github.com/BuilderIO/agent-native/blob/main/packages/scheduling/docs/skills/embeds/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在我的网站上放一个预约按钮,点击后以弹出窗口的形式打开我的会议页面。”
每周 5 个新技能,1 分钟读完。
工作原理
技能提供一段简短的脚本代码片段,以及所选样式的容器。在内嵌链接上添加的设置可以控制该会话的主题、颜色、语言和时区。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Embeds
Modes
- inline — iframe embedded in the page
- popup — trigger opens modal overlay with iframe
- element-click / floating-button — fixed-position trigger anywhere on the page
URL
Embed page: /:user/:slug/embed — same Booker, no chrome, theme honored
via query params.
Snippet
<script src="https://<host>/embed.js" async></script>
<div id="cal-inline-embed"></div>
<script>
Cal("init", { origin: "https://<host>" });
Cal("inline", {
elementOrSelector: "#cal-inline-embed",
calLink: "my-user/intro",
config: { theme: "light" }
});
</script>
Theming
Query params on the embed URL:
theme=light|darkprimaryColor=<hex>locale=en|es|...timeZone=America/Los_Angeles
These override the event type's defaults for the embedded session only.
Message passing
The iframe posts messages to the parent on lifecycle events:
__cal.init, __cal.booking-successful, __cal.booking-cancelled,
__cal.booking-rescheduled.
常见问题
有哪些内嵌样式可用?
内联、弹出窗口和浮动按钮。
我能更改内嵌页面的颜色吗?
可以。可以通过内嵌链接上的设置来设置主色和主题。
内嵌页面如何把预约信息告知我的页面?
内嵌页面会在成功预约等事件发生时,向父页面发送消息。
详情
作者的原始描述
Inline, popup, and floating-button embeds — snippet generation and theming.
repo: BuilderIO/agent-native
热度
- GitHub 星标
- 7.6k
- 排名
- #13198
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …