🌐 Nodejs.cn

2025年12月 - npx shadcn create

自定义一切。选择你的组件库、图标、基础颜色、主题、字体,并创建你自己的 shadcn/ui 版本。

从第一次提交开始,shadcn/ui 的目标就是让它可定制化。

🌐 From the very first commit, the goal of shadcn/ui was to make it customizable.

这个想法是为你提供可靠的默认值、间距、颜色标记、动画和无障碍支持,然后让你从那里开始。调整代码。添加新组件。更改颜色。构建你自己的版本。

🌐 The idea is to give you solid defaults, spacing, color tokens, animations, accessibility, and then let you take it from there. Tweak the code. Add new components. Change the colors. Build your own version.

但在某个过程中,所有应用看起来都一样了。我想默认设置太好了。有我的错。

🌐 But somewhere along the way, all apps started looking the same. I guess the defaults were a little too good. My bad.

今天,我们要改变这一点:npx shadcn create

🌐 Today, we're changing that: npx shadcn create.

自定义一切。选择你的组件库、图标、基础颜色、主题、字体,并创建你自己的 shadcn/ui 版本。

🌐 Customize Everything. Pick your component library, icons, base color, theme, fonts and create your own version of shadcn/ui.

我们从5种全新的视觉风格开始,旨在帮助你的用户界面真正感觉像是_你的_界面。

🌐 We're starting with 5 new visual styles, designed to help your UI actually feel like your UI.

  • Vega – 经典的 shadcn/ui 风格。
  • Nova – 减少填充和边距以实现紧凑布局。
  • Maia – 柔和圆润,间距宽松。
  • Lyra – 方正且锋利。与单线字体搭配效果佳。
  • Mira – 紧凑型。为密集界面而设计。

这超越了主题化

你的配置不仅仅改变颜色,它会重写组件代码以匹配你的设置。字体、间距、结构,甚至你使用的库,一切都会适应你的偏好。

🌐 Your config doesn't just change colors, it rewrites the component code to match your setup. Fonts, spacing, structure, even the libraries you use, everything adapts to your preferences.

新的命令行工具处理这一切。

🌐 The new CLI takes care of it all.

从组件库开始。选择 Radix 或 Base UI。

🌐 Start with a component library. Choose between Radix or Base UI.

我们为 Base UI 重建了每一个组件,保持了相同的抽象。它们与你现有的组件完全兼容,即使是从远程注册表中拉取的组件。

🌐 We rebuilt every component for Base UI, keeping the same abstraction. They are fully compatible with your existing components, even those pulled from remote registries.

当你拉取组件时,我们会自动检测你的库并应用正确的转换。

🌐 When you pull down components, we auto-detect your library and apply the right transformations.

是时候构建一些与众不同的东西了。

现已适用于 Next.js、Vite、TanStack Start 和 v0。

🌐 Now available for Next.js, Vite, TanStack Start and v0.

开始使用