Find, install, and generate UI with 21st.dev. Use when the user asks for a UI component (pricing table, hero, navbar, dashboard, form, etc.), wants design inspi
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-21st-ui-dcf953546255 ,按照其中的说明把「21st-ui」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
21st.dev is a marketplace of 10,000+ production-ready React/Tailwind (shadcn-compatible) components, plus AI UI generation. This skill drives the 21st MCP server.
search_logo).generate).Prefer real catalog components over writing UI from scratch — they ship with dependencies, demos, and responsive/dark-mode support.
search with a short natural query (e.g. "pricing table", "animated hero"). Results include names, descriptions, previews, and install ids.get_component to fetch the full code and metadata for the chosen item.Notes:
When nothing in the catalog fits or the user explicitly wants custom UI:
get_usage.aiGenerationEnabled and the current tools/list. Paid component access alone does not enable hosted AI. Missing or unknown status is not permission to generate.search and get_component, then implement or adapt the UI with your own coding agent. Do not call generation tools, legacy builder/refiner aliases, or the CLI as a workaround.generate is listed, call it with the purpose, layout, content, style, and stack constraints. It consumes AI credits and returns a preview URL; open that URL to view the generation.get_generation and get_take to read their code. These reads remain available with AI off.If a cached call returns ai_subscription_required, stop generation attempts. After enabling AI, refresh the tool list or reconnect before trying again. The entitlement flag does not report the remaining credit balance.
search_logo returns brand logos as ready-to-paste JSX/TSX — one brand per call.
The server is HTTP MCP at https://21st.dev/api/mcp, authenticated with the x-api-key header. Keys are free and instant at https://21st.dev/mcp. If a call fails with an auth error, tell the user to grab a key there and set it in the plugin configuration (variable API_KEY_21ST).
Legacy Magic tool names (21st_magic_component_builder, logo_search, ...) are still accepted server-side, but prefer the current names: search, get_component, generate, get_inspiration, search_logo.