About this skill
ui
Dialog (app/src/components/ui/dialog.tsx)
Dialog.confirm: 显示一个确认对话框,返回一个 Promise,用户点击确认时 resolve,点击取消时 reject。Dialog.input: 显示一个输入对话框,返回一个 Promise,用户输入内容并点击确认时 resolve,点击取消时 reject。Dialog.copy: 显示一个复制对话框,返回一个 Promise,用户关闭对话框时 resolve。Dialog.buttons: 显示一个带有自定义按钮的对话框,返回一个 Promise,用户点击任意按钮时 resolve,参数为被点击按钮的id。
toast() (import { toast } from "sonner")
toast: 显示一个通用的、info 类型的 toast 消息,参数为消息内容,尽量不要使用此函数,推荐使用下面的toast.success()等方法。toast.success: 显示一个成功类型的 toast 消息,参数为消息内容。toast.error: 显示一个错误类型的 toast 消息,参数为消息内容。toast.warning: 显示一个警告类型的 toast 消息,参数为消息内容。toast.promise: 见下面的示例代码。
await toast
.promise(
async () => {
// 异步操作
},
{
loading: "promise进行中的提示",
success: "resolve后的提示",
error: "reject后的提示",
},
)
// unwrap方法会直接把传入的promise返回出来
.unwrap();
Install ui in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the ui skill do?
建立于 shadcn/ui 之上的附加 UI 组件
How do I install the ui skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the ui skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
by Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
by Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
by Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
by Anthropic