Token导航 LogoToken导航TokenDH.com
研究检索只读unknown未标认证来源可访问许可证需确认审计未展示

acejou27-shadcn-uiacejou27 shadcn/ui UI 搜索

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

1

周安装

8

下载量

65
Local Agent

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:acejou27-shadcn-ui(acejou27 shadcn/ui UI 搜索)
来源仓库:https://smithery.ai
仓库路径:acejou27-shadcn-ui
安装命令:
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

用于辅助 shadcn/ui 组件的集成、配置与样式定制,提升界面开发效率。

  • 适合在 Next.js、Vite、Remix 等框架中快速添加按钮、表单、表格等可复用组件。
  • 可通过 CLI 命令添加组件,支持暗色模式、表单验证和响应式布局等高级特性。
  • 安装前需确认项目是否使用 Tailwind CSS 和 Radix UI,避免依赖冲突或环境不兼容。
  • acejou27-shadcn-ui 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Shadcn-UI Skill

Expert assistance with shadcn/ui - a collection of beautifully-designed, accessible components built with TypeScript, Tailwind CSS, and Radix UI primitives. Supports Next.js, Vite, Remix, Astro, Laravel, and more.

When to Use This Skill

This skill should be triggered when:

  • Installing or configuring shadcn/ui in any supported framework
  • Adding shadcn/ui components (Button, Dialog, Form, Table, etc.)
  • Implementing forms with React Hook Form or TanStack Form
  • Setting up dark mode with shadcn/ui theming
  • Customizing component styles or design tokens
  • Building data tables with sorting/filtering/pagination
  • Working with overlays (dialogs, sheets, popovers, tooltips)
  • Creating accessible navigation components
  • Implementing toast notifications or alerts
  • Using the shadcn CLI to add components
  • Customizing components.json configuration
  • Building charts or carousels with shadcn/ui
  • Questions about shadcn/ui best practices or patterns

Quick Reference

Installation and CLI

# Initialize shadcn/ui in a project
npx shadcn@latest init

# Add specific components
npx shadcn@latest add button
npx shadcn@latest add dialog form input

# Add all components
npx shadcn@latest add

Basic Button Component

import { Button } from "@/components/ui/button"

export default function Example() {
  return (
    <div className="flex gap-2">
      <Button>Default</Button>
      <Button variant="destructive">Delete</Button>
      <Button variant="outline">Cancel</Button>
      <Button variant="ghost">Ghost</Button>
      <Button variant="link">Link</Button>
      <Button size="sm">Small</Button>
      <Button size="lg">Large</Button>
    </div>
  )
}

Form with Validation

import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import { z } from "zod"
import { Button } from "@/components/ui/button"
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form"
import { Input } from "@/components/ui/input"

const formSchema = z.object({
  username: z.string().min(2).max(50),
  email: z.string().email(),
})

export default function ProfileForm() {
  const form = useForm<z.infer<typeof formSchema>>({
    resolver: zodResolver(formSchema),
  })

  function onSubmit(values: z.infer<typeof formSchema>) {
    console.log(values)
  }

  return (
    <Form {...form}>
      <form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
        <FormField
          control={form.control}
          name="username"
          render={({ field }) => (
            <FormItem>
              <FormLabel>Username</FormLabel>
              <FormControl>
                <Input placeholder="johndoe" {...field} />
              </FormControl>
              <FormMessage />
            </FormItem>
          )}
        />
        <Button type="submit">Submit</Button>
      </form>
    </Form>
  )
}

Dialog Component

import { Button } from "@/components/ui/button"
import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogHeader,
  DialogTitle,
  DialogTrigger,
} from "@/components/ui/dialog"

export default function Example() {
  return (
    <Dialog>
      <DialogTrigger asChild>
        <Button>Open Dialog</Button>
      </DialogTrigger>
      <DialogContent>
        <DialogHeader>
          <DialogTitle>Are you sure?</DialogTitle>
          <DialogDescription>
            This action cannot be undone.
          </DialogDescription>
        </DialogHeader>
      </DialogContent>
    </Dialog>
  )
}

Toast Notifications

import { useToast } from "@/hooks/use-toast"
import { Button } from "@/components/ui/button"

export default function Example() {
  const { toast } = useToast()

  return (
    <Button
      onClick={() => {
        toast({
          title: "Success",
          description: "Your changes have been saved.",
        })
      }}
    >
      Show Toast
    </Button>
  )
}

Data Table with Sorting

import {
  Table,
  TableBody,
  TableCell,
  TableHead,
  TableHeader,
  TableRow,
} from "@/components/ui/table"

const invoices = [
  { id: "INV001", status: "Paid", amount: "$250.00" },
  { id: "INV002", status: "Pending", amount: "$150.00" },
]

export default function DataTable() {
  return (
    <Table>
      <TableHeader>
        <TableRow>
          <TableHead>Invoice</TableHead>
          <TableHead>Status</TableHead>
          <TableHead>Amount</TableHead>
        </TableRow>
      </TableHeader>
      <TableBody>
        {invoices.map((invoice) => (
          <TableRow key={invoice.id}>
            <TableCell>{invoice.id}</TableCell>
            <TableCell>{invoice.status}</TableCell>
            <TableCell>{invoice.amount}</TableCell>
          </TableRow>
        ))}
      </TableBody>
    </Table>
  )
}

Select Dropdown

import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"

export default function Example() {
  return (
    <Select>
      <SelectTrigger className="w-[180px]">
        <SelectValue placeholder="Select a fruit" />
      </SelectTrigger>
      <SelectContent>
        <SelectItem value="apple">Apple</SelectItem>
        <SelectItem value="banana">Banana</SelectItem>
        <SelectItem value="orange">Orange</SelectItem>
      </SelectContent>
    </Select>
  )
}

Dark Mode Setup (Next.js)

// app/providers.tsx
"use client"

import { ThemeProvider } from "next-themes"

export function Providers({ children }: { children: React.ReactNode }) {
  return (
    <ThemeProvider attribute="class" defaultTheme="system" enableSystem>
      {children}
    </ThemeProvider>
  )
}

// Usage in component
import { useTheme } from "next-themes"
import { Button } from "@/components/ui/button"

export function ThemeToggle() {
  const { setTheme } = useTheme()

  return (
    <Button onClick={() => setTheme("dark")}>Dark Mode</Button>
  )
}

Card Component

import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"

export default function Example() {
  return (
    <Card>
      <CardHeader>
        <CardTitle>Card Title</CardTitle>
        <CardDescription>Card description goes here</CardDescription>
      </CardHeader>
      <CardContent>
        <p>Card content</p>
      </CardContent>
    </Card>
  )
}

Combobox (Searchable Select)

import { Check, ChevronsUpDown } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem } from "@/components/ui/command"
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"

const frameworks = [
  { value: "next", label: "Next.js" },
  { value: "react", label: "React" },
  { value: "vue", label: "Vue" },
]

export default function Combobox() {
  const [open, setOpen] = React.useState(false)
  const [value, setValue] = React.useState("")

  return (
    <Popover open={open} onOpenChange={setOpen}>
      <PopoverTrigger asChild>
        <Button variant="outline" className="w-[200px] justify-between">
          {value || "Select framework..."}
          <ChevronsUpDown className="ml-2 h-4 w-4" />
        </Button>
      </PopoverTrigger>
      <PopoverContent className="w-[200px] p-0">
        <Command>
          <CommandInput placeholder="Search..." />
          <CommandEmpty>No framework found.</CommandEmpty>
          <CommandGroup>
            {frameworks.map((framework) => (
              <CommandItem
                key={framework.value}
                onSelect={() => {
                  setValue(framework.value)
                  setOpen(false)
                }}
              >
                <Check className={value === framework.value ? "mr-2 h-4 w-4" : "mr-2 h-4 w-4 opacity-0"} />
                {framework.label}
              </CommandItem>
            ))}
          </CommandGroup>
        </Command>
      </PopoverContent>
    </Popover>
  )
}

Reference Files

This skill includes comprehensive documentation in references/:

llms.md

Complete overview of shadcn/ui with links to all components and features. Covers:

  • Core principles (Open Code, Composition, Distribution, Beautiful Defaults, AI-Ready)
  • Installation guides for all supported frameworks (Next.js, Vite, Remix, Astro, Laravel, etc.)
  • Complete component catalog organized by category
  • Dark mode setup for different frameworks
  • Forms integration (React Hook Form, TanStack Form)
  • Advanced topics (monorepo, React 19, Tailwind v4, JavaScript usage)
  • Registry system for publishing/distributing components
  • MCP Server integration for AI assistants

other.md

Additional documentation mirroring llms.md content with organized sections for:

  • All component categories (Form & Input, Layout & Navigation, Overlays & Dialogs, etc.)
  • Installation instructions by framework
  • Dark mode configuration
  • Registry schemas

Use view references/llms.md for quick access to component links and documentation structure.

Working with This Skill

For Beginners

  1. Start by initializing shadcn/ui: npx shadcn@latest init
  2. Add basic components like Button, Input, and Card to learn the patterns
  3. Review the Quick Reference examples above for common use cases
  4. Use references/llms.md to explore available components by category

For Building Forms

  1. Install form components: npx shadcn@latest add form input
  2. Set up React Hook Form with Zod validation (see Form example above)
  3. Use Field component for labels and error messages
  4. Check the Forms section in references for advanced patterns

For Complex Components

  1. Check component categories in references (Data Table, Command, Combobox)
  2. Install required dependencies (some components use external libraries)
  3. Follow the component-specific documentation links
  4. Customize using Tailwind classes and component props

For Theming

  1. Edit components.json to configure paths and styling
  2. Use the Theming guide for customizing colors and design tokens
  3. Set up dark mode using the framework-specific guide
  4. Override CSS variables for fine-grained control

Key Concepts

Component Philosophy

  • Open Code: Components are copied into your project, not installed as dependencies
  • Composition: Components are built using Radix UI primitives for accessibility
  • Customization: Full control over styling using Tailwind CSS
  • Copy-paste friendly: Modify components directly in your codebase

Installation Model

Unlike traditional libraries, shadcn/ui components are added to your project via CLI:

  • Components live in your components/ui directory
  • You have full ownership and can modify them
  • No package.json dependency (except for Radix UI and utilities)
  • Update components by re-running add command

components.json

Central configuration file that controls:

  • Component installation paths
  • TypeScript/JavaScript preference
  • Tailwind CSS configuration
  • Style variants (default/new-york)
  • CSS variable usage
  • Import aliases

Styling Approach

  • Uses Tailwind CSS utility classes
  • CSS variables for theming (light/dark mode)
  • cn() utility for conditional classes
  • Variants defined using class-variance-authority

Accessibility

All components built on Radix UI primitives ensure:

  • Keyboard navigation
  • Screen reader support
  • ARIA attributes
  • Focus management

Framework Support

Works with any React framework through appropriate setup:

  • Next.js: App Router and Pages Router
  • Vite: Standard React setup
  • Remix: Requires specific configuration
  • Astro: React integration
  • Laravel: Via Inertia.js
  • Others: Manual installation guide available

Common Patterns

Async Form Submission (Next.js Server Actions)

"use server"
async function onSubmit(formData: FormData) {
  const data = {
    name: formData.get("name"),
    email: formData.get("email"),
  }
  // Process data
  return { success: true }
}

Responsive Dialog/Sheet

Use Dialog for desktop, Sheet for mobile:

import { useMediaQuery } from "@/hooks/use-media-query"
import { Dialog, DialogContent } from "@/components/ui/dialog"
import { Sheet, SheetContent } from "@/components/ui/sheet"

const isDesktop = useMediaQuery("(min-width: 768px)")

if (isDesktop) {
  return <Dialog>...</Dialog>
}
return <Sheet>...</Sheet>

Controlled Components

const [open, setOpen] = useState(false)
const [value, setValue] = useState("")

<Dialog open={open} onOpenChange={setOpen}>
  <DialogContent>...</DialogContent>
</Dialog>

Resources

Official Documentation

Tools

  • v0 by Vercel: AI-powered UI generation with shadcn/ui
  • Figma: Design resources available
  • MCP Server: AI assistant integration for Claude Code, Cursor, etc.

Registry

Create and publish your own component collections:

  • Set up private or public registries
  • Share components across projects
  • Use authentication for private registries

Troubleshooting

Import Errors

Ensure your tsconfig.json has the correct path aliases:

{
  "compilerOptions": {
    "paths": {
      "@/*": ["./*"]
    }
  }
}

Styling Issues

  1. Verify Tailwind CSS is configured with tailwind.config.js
  2. Check that globals.css imports are present
  3. Ensure cn() utility is in lib/utils.ts

Component Not Found

Run npx shadcn@latest add <component-name> to install missing components

Notes

  • Components are framework-agnostic and work with any React setup
  • Dark mode requires theme provider (next-themes or similar)
  • Some components depend on external libraries (date-fns, recharts, etc.)
  • The CLI handles dependency installation automatically
  • Components can be customized without breaking updates
  • Registry system allows publishing custom component collections
  • MCP integration enables AI-powered component installation

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Local Agent

97.24%
按下载量换算63

安全审计

暂无安全审计结果可展示。

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills