怎么建立自己的网站平台,如何做一个商城类型的网站,肇庆网站开发,海口建设网站建设1、安装nextjs
创建文件夹next-shadcn 在文件夹中执行
npx create-next-applatest . --typescript --tailwind --eslint安装后#xff0c;跑起来 2、安装shadcn
在刚才目录下#xff0c;运行命令
npx shadcn-uilatest init目录中会增加两个目录
components 和lib
替换原…1、安装nextjs
创建文件夹next-shadcn 在文件夹中执行
npx create-next-applatest . --typescript --tailwind --eslint安装后跑起来 2、安装shadcn
在刚才目录下运行命令
npx shadcn-uilatest init目录中会增加两个目录
components 和lib
替换原始page.tsx文件 export default function Home() {return (h1Hello World/h1/);
}3、安装一个button组件
npx shadcn-uilatest add button4、增加一个自定义样式
myButton: p-2 bg-orange-400,page.tsx代码
import { Button } from /components/ui/button;export default function Home() {return (h1Hello World/h1Button variantoutlineButton/ButtonButton variantmyButtonButton/Button/);
}界面效果 学习资源https://www.freecodecamp.org/news/shadcn-with-next-js-14/#how-to-install-next-js