Skip to main content

shadcn/ui

https://ui.shadcn.com/

為什麼 Shadcn UI 是 2023 年前端最熱門的開源專案? | by Leo Chiu | 手寫筆記

npx create-next-app@latest
cd <project-name>
npx shadcn-ui@latest init

Customize installation directory of ui components

https://ui.shadcn.com/docs/components-json

For example:

{
"aliases": {
"ui": "@/components/shadcn-ui"
}
}

Troubleshooting

Can't resolve '@/components/icons'

Module not found: Can't resolve '@/components/icons'

> 7 | import { Icons } from "@/components/icons"
| ^

See https://github.com/shadcn-ui/ui/issues/1006

Copy https://github.com/shadcn-ui/ui/blob/main/apps/www/components/icons.tsx