Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

ui

FreeNo executable scriptsNot checked

建立于 shadcn/ui 之上的附加 UI 组件

graphifby graphif★ 4,563 GitHub stars

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
Sign up freeI already have an account

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

Compare ui with